How to define event handler in win32com?

Mark Hammond MarkH at ActiveState.com
Mon Jan 22 12:29:11 EST 2001


In article <94hfsd$hkd$1 at nnrp1.deja.com>,
  shenwang at my-deja.com wrote:
> After using makepy, I can easily access properties and methods
> of a com object, but I do not how to bind my python function
> to the events defined in that object. Any help?

Check out win32com\test\testMSOfficeEvents.py for a working sample, or
the docstrings for win32com.client.DispatchWithEvents for an example
using IE.

Mark.


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list