py2exe questions

Thomas Heller theller at ctypes.org
Fri Nov 3 23:48:17 CET 2006


Larry Bates schrieb:
> Doug Stell wrote:
>> I have 2 questions about py2exe or any similar utility.
>> 
>> 1. Is it possible to create a single Windows executable that does not
>> blow out to a folder full of files and can be called from scripts
>> using command line arguments?
>> 
>> 2. If the above can be done, it is possible to hide parts of the
>> Python source code from users? These users are software developers,
>> but we don't want them to see how the code does what it does.
>> 
>> thanks, doug
> 
> py2exe reduce the number of files you need to distribute down to 4:
> 
> msvcr71.dll
> w9xpopen.exe  (Windows/98 support)
> library.zip (all .pyo, .pyd, and .dll files)
> applcation.exe

It can easily be reduced to 2 files by 'embedding' the libray.zip
into the exe (use the zipfile=None option), and deleting the w9xpopen.exe
if you don't need win98 support.

> I does not however go to great lengths to "hide" the code from
> someone with time/expertise that wants to get to your code
> (but then just about anything can be disassembled).  The compiled
> .pyo files are just placed in library.zip.  At least it doesn't
> send your .py files along.

Thomas




More information about the Python-list mailing list