Strange - I can't repro this on my outlook box (my Vista 64 box doesn't have Outlook). It looks like a ^M character ended up in the file in place or the line ending we expect. Do you have any idea what could cause this? Could you please open the generated file in a text editor and see if it is only the one line with the strange line endings, or is there something else causing the error?
Thanks Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vinay Anantharaman Sent: Friday, 22 August 2008 6:08 AM To: python-win32@python.org Subject: [python-win32] win32Com.gencache.EnsureDispatch Problems Hi, I executed the following code on a Windows Vista 64 bit machine with Python 2.4.2 and the latest win32com: from win32com.client import gencache try: outlook = gencache.EnsureDispatch("Outlook.Application") except TypeError: print "uh-oh" Result: Traceback (most recent call last): File "<stdin>", line 4, in ? File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 537, in EnsureDispatch GetModuleForCLSID(disp_clsid) File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 240, in GetModuleForCLSID makepy.GenerateChildFromTypeLibSpec(sub_mod, info) File "C:\Python24\Lib\site-packages\win32com\client\makepy.py", line 325, in GenerateChildFromTypeLibSpec __import__("win32com.gen_py." + dir_name + "." + child) File "C:\Users\vinaya\AppData\Local\Temp\gen_py\2.4\00062FFF-0000-0000-C000-00000 0000046x0x9x3\_Application.py", line 78 ret = Dispatch(ret, u'CreateItemFromTemplate', None, UnicodeToString=0)^M return ret SyntaxError: invalid syntax I can makepy on the Outlook Com library manually however, I'd prefer to use the EnsureDispatch function. Thank you, Vinay Anantharaman
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32