Newbie Pythom + Newbie Com = Way confussed

Mark Hammond MarkH at ActiveState.com
Tue Oct 31 23:49:00 EST 2000


John Shankland wrote:

> The problem is I need to get some information from the
> device which it sends asynchronously and I guess calls some function in
> my code. The name of the function is ( not that it matters )
> SlinkeDeviceEvent. 

You will probably find that you are expected to implement a _class_ for 
events, and the function goes in this class (ie, is a method).

Open win32com\client\__init__.py, and read the docstring for 
"DispatchWithEvents" - it has an example using IE.

Also, run makepy over the control (select it from the list) and check 
out the generated file - it should have a class with a template class 
ready to go.

I suggest you run makepy over the IE library, check out the file, and 
get the IE example working first.  Then use the exact same technique for 
your control.

Good luck!

Mark.




More information about the Python-list mailing list