How to create a single executable console application?

Podi podi.ex at gmail.com
Fri Apr 14 00:47:25 EDT 2006


Alright, pythoneers, here is what I have found from
http://wiki.wxpython.org/index.cgi/CreatingStandaloneExecutables. This
is much easier than the py2exe + nullsoft combo :)

Cheers!

The mcillian installer development is discontinued.

mirror:
http://davidf.sjsoft.com/mirrors/mcmillan-inc/installer_dnld.html

Continued development(not tested yet):
http://pyinstaller.hpcf.upr.edu/cgi-bin/trac.cgi

This works on Win32.
Unzip the Installer in a directory of your choice, and cd there.

Configure the Installer by running:

python Configure.py

Python must be in your PATH for this to work, if it's not, type from
the command prompt: PATH=%PATH%;c:\python23

where c:\python23 must be replaced with the root of your python
installation.
Then, assuming the source code is app.py (placed in c:\source): python
Makespec.py --upx --onefile --noconsole c:\source\app.py
python Build.py  app\app.spec

Replace 'app' everywhere above with your application name.
You will end up with app\app.exe under the Installer dir.This is a one
file .exe containing all the application.
If you don't want a one-file build, suppress the option --onefile
above.
If you don't have upx installed (or don't want to use it), suppress the
option --upx above.
The option --noconsole is needed to produce a windows gui application,
instead of a console one (so the command shell won't pop up when you
run the application).




More information about the Python-list mailing list