[python-win32] genpy and py2exe

Martin Richard Richard.Martin at thomson.net
Tue May 13 15:19:58 EDT 2003


I solved the problem this way; I don't like the fact that the gen_py code is
not generated at runtime.

I make sure the gen_py modules are generated by first running my code.
I then use this to package it:
   xyz_setup.py py2exe -i win32com.gen_py.*

Rick

-----Original Message-----
From: Erignac, Charles A [mailto:charles.a.erignac at boeing.com]
Sent: Tuesday, May 13, 2003 9:04 AM
To: python-win32 at python.org
Subject: [python-win32] genpy and py2exe


I am trying to use the genpy capability from within the confines of Python
program packaged by py2exe. This program and its dependent modules are
packaged in a single executable zip archive. When the executable starts the
support code of py2exe substitutes the default module importer, which looks
for modules in the file system, with an importer that looks for modules
directly in the archive.
For some reason I cannot pre-package my COM wrappers. Unfortunately the
py2exe is incompatible with generating wrappers on demand. Genpy will create
the wrappers but the Python environment cannot load them.
I have not looked deep enough yet in the importer mechanism to know whether
one could add a secondary importer to look for the modules elsewhere.
Suggestions are welcome.
Best regards,
Charles

_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32



More information about the Python-win32 mailing list