[python-win32] pywin32 py2exe

Umesh Sharma usharma01 at gmail.com
Fri Jun 3 12:55:15 CEST 2011


hi,
i am working on outlook automation , in my code i am using
dispatchwithevents method for capturing events of outlook as newmail
,itemsend .The code works fine in command line but after converting it into
exe file using py2exe ,the generated exe file crashes .
I am not using dispatch for generating object of outlook because i have to
do event handling.
here is my code
/////
import time, win32event, win32com.client, pythoncom
class xlEv:
def OnNewMailEx(self,entry):
print 'event happened'
xl=win32com.client.DispatchWithEvents("Outlook.Application", xlEv)
i = input    #waiting till event captured
 /////

Thanks
Umesh Kumar Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110603/d4c7fa87/attachment.html>


More information about the python-win32 mailing list