py2exe 0.6.1 released

Thomas Heller theller at
Tue Sep 6 11:12:46 CEST 2005

"Giovanni Bajo" <noway at> writes:

> Thomas Heller wrote:
>>     * py2exe can now bundle binary extensions and dlls into the
>>       library-archive or the executable itself.  This allows to
>>       finally build real single-file executables.
>>       The bundled dlls and pyds are loaded at runtime by some special
>>       code that emulates the Windows LoadLibrary function - they are
>>       never unpacked to the file system.
> Cute!
> I tried it using the wx singlefile example, but unfortunately the resulting
> executable segfaults at startup (using Python 2.3.3 on Windows 2000, with
> latest wxWindows).

Yes, I can reproduce that.  I'm still using wxPython for Python
2.3.5, and that combo works.  I have done a few tests, and wxPython also works, while crashes.

> How can I debug it?

I'll assume that's a serious question.
There is no simple answer.  First, the py2exe'd app responds to a
PY2EXE_VERBOSE environment variable, if you set it to '1', the exe will
reports imports (just as PYTHONVERBOSE does for python scripts).  Of
course you have to change the sample so that it is built as console app
to be able to see the messages.

Then, you can throw some additional prints into
lib\site-packages\, to see what it does.

I've done all this, and it seems it is crashing when trying to import
_gdi.pyd.  Next would be to debug through _memimported.pyd, but I don't
have a debug build of wxPython.

That's all I can say now.

I'll ask on the wxPython mailing list if they have an idea.


More information about the Python-list mailing list