Question concerning makepy.py for COM (long, code included)

Scott Anderson sanderson at ttm.com
Wed Feb 9 17:45:28 EST 2000


mhammond at skippinet.com.au wrote:
> > I ran the makepy.py script that comes with the win32com
distribution
> > (the 128 release).  From the file produced, it is not entirely
> obvious
> > how to instantiate and use the objects.
> 
> You dont need to do anything special - just call
> "win32com.client.Dispatch(prog_id)" and it should work.

That's dynamic dispatch. I was under the impression that makepy
generated a Python module suitable for doing static dispatch...

>From this page
(http://www.python.org/windows/win32com/COMTutorial/img042.htm) I had
gotten the idea that I should just be able to do "o = foo.TSHSWAPI()"
(from the code I posted) and get a working object (this does not work,
hence my question).

Thanks,

-scott




More information about the Python-list mailing list