[python-win32] py2exe problem with com
Brunain Christophe
Christophe.Brunain at health.fgov.be
Mon May 26 12:27:39 EDT 2003
hello you all
thanks for your help in my previous message, it was fine :o)
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
the problem comes from the COM module that i use, because when i try to use
py2exe after removing all the com stuff, it works
here is the output from py2exe :
running py2exe
running build
running build_scripts
copying and adjusting unload2xls.py -> build\scripts-2.2
running install_scripts
copying build\scripts-2.2\unload2xls.py ->
build\bdist.win32\winexe\lib\python22
\Scripts
+----------------------------------------------------
| Processing script unload2xls.py with py2exe-0.3.4
+----------------------------------------------------
Searching modules needed to run 'unload2xls.py' on path:
['C:\\test\\build\\bdist.win32\\winexe\\lib\\python22\\Lib\\site-packages',
'',
'C:\\Python22\\lib\\site-packages\\Pythonwin',
'C:\\Python22\\lib\\site-packages
\\win32', 'C:\\Python22\\lib\\site-packages\\win32\\lib',
'C:\\Python22\\lib\\si
te-packages', 'c:\\python22\\DLLs', 'c:\\python22\\lib',
'c:\\python22\\lib\\lib
-tk', 'c:\\python22']
Traceback (most recent call last):
File "setup.py", line 6, in ?
scripts=["unload2xls.py"],
File "c:\python22\lib\distutils\core.py", line 138, in setup
dist.run_commands()
File "c:\python22\lib\distutils\dist.py", line 893, in run_commands
self.run_command(cmd)
File "c:\python22\lib\distutils\dist.py", line 913, in run_command
cmd_obj.run()
File "C:\Python22\Lib\site-packages\py2exe\build_exe.py", line 526, in run
mf.run_script(script)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
122, i
n run_script
self.load_module('__main__', fp, pathname, stuff)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
291, i
n load_module
self.scan_code(co, m)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
311, i
n scan_code
self.import_hook(name, m)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
134, i
n import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
175, i
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
291, i
n load_module
self.scan_code(co, m)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
311, i
n scan_code
self.import_hook(name, m)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
134, i
n import_hook
q, tail = self.find_head_package(parent, name)
File "C:\Python22\Lib\site-packages\py2exe\tools\modulefinder.py", line
175, i
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 ?
thanks a lot
Brunain Christophe
Service informatique de l'expertise médicale
SPF Santé Publique, Sécurité de la chaine alimentaire et Environnement
telephone : 02/287.05.71
email : christophe.brunain at health.fgov.be
Rue de la Loi, 56
1040 Bruxelles
More information about the Python-win32
mailing list