September 11th, 2004, 02:50 PM
a py2exe question
Is there a way to compile all files to 1 .exe file, so you dont need to have the .zip file and all? (compile all to 1.exe file)
September 12th, 2004, 03:19 AM
The simple answer is No, because Python needs several DLLs to run, as well as the zip with the .pyc files.
However there is a utility called 'freeze' in the source distribution that converts .pyc files into C data tables so that they can be compiled into .obj files. You would need to recompile Python from source into a single exe, changing the DLLs to static libraries that can be linked in too. So it is possible, but would be a LOT of work.
If you are concerned about distributing your program it is much better to use an installer such as Inno Setup which will package all your files into a self extracting exe.
Dave - The Developers' Coach
September 12th, 2004, 06:28 AM
Il take a look at it