[Py2exe-users] sys.modules hijinx breaks windows executables
by Jonathan Lange other posts by this author
Jun 23 2004 2:07PM messages near this date
[Py2exe-users] Python service problems
|
[Py2exe-users] How to add a package loaded at run time
Hello,
A module can attempt to delete itself from sys.modules (see selfabuser.py).
This works perfectly well running in the normal python interpreter on
many platforms. As evidence, Twisted does this in its reactor module.
One can build a console exe using py2exe 0.5, where this works perfectly.
However, when you build the same script to a windows exe, it fails.
Moreover, it fails hard. A try/except block around the offending
statement catches nothing.
I'd greatly appreciate a work-around. However, I'd appreciate an
explanation of why this is failing even more.
cheers,
jml
Attachments:
crash-py2exe.py
selfabuser.py
setup.py
|