[python-win32] Re: py2exe problem with com

Thomas Heller theller at python.net
Mon May 26 10:35:54 EDT 2003


Brunain Christophe <Christophe.Brunain at health.fgov.be> writes:

> Now, i've finished my script, it works good when i call it from the command
> line, but when i try to """compile""" it with py2exe, it fails
> 
[...]

> n find_head_package
>     q = self.import_module(head, qname, parent)
>   File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
> 261, i
> n import_module
>     m = self.load_module(fqname, fp, pathname, stuff)
>   File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
> 276, i
> n load_module
>     co = compile(fp.read()+'\n', pathname, 'exec')
>   File "<string>", line 1
>     from win32com.client import *
>                                  ^
> SyntaxError: invalid syntax
> 
> have someone met this problem before ?

Could it be that your script has non-dos line endings?
The compile function has problems with them, IIRC.

Thomas




More information about the Python-win32 mailing list