i just wonder how this works, when i have
some import statement in my script, the module
is loaded from the local hard disk if it is a
python module. Also, DLLs can be loaded.
I understand that with py2exe, needed DLLs are copied
to be distributed with the executable.
But what about python modules?
What happens with these files?
What happens when the import statement in my script
Thanks for hints,
This probably deserve a primer on the py2exe wiki (Thomas, any way to get edit
rights on the wiki?).
I give you a quick idea on how things work.
The main script (the one that you declare as windows or console in the setup()
call) is byte-compiled and inserted into a resource of the final executable.
The dependant pure-source python modules are bytecompiled and gathered into a
zip file that usually becomes the "zip file that appears in the directory".
Py2exe uses a common trick to import from a zip file transparently.
dll though need to be accessible by the system dynamic linker. So the DLL must
be inserted somewhere in the PATH.
I think that Thomas has a plan to bring everything into a single exec at some
point. I am not too sure how this is doable with pyd and dlls but it sure sounds
From: Thomas Heller <theller@py...> - 2005-01-26 20:33:55
Guillaume Proux <guillaume.proux@...> writes:
> This probably deserve a primer on the py2exe wiki (Thomas, any way to
> get edit rights on the wiki?).
Sure - you must 'log in'. Click the UserPreferences link at the top
right corner. I set the wiki to require this because there was too much
spam - unfortunately this also stopped most useful contributions.