[Tutor] stand alone python applications

Alan Gauld alan.gauld at blueyonder.co.uk
Tue Jul 6 09:07:23 CEST 2004

> hello, does anyone know if you can do something to the effect
> of compiling python so that it will act as a stand alone application
> - ie., can I write an application in python, create a wxpython
> interface and distribute it to my customers without them having
> to install python or anything else but my application?

There are several ways to achieve this.

1) Include Python in an install script and get the script to
check whether a suitable version of Python already exists before
installing your version. That way you don't mess up your customers
machine. (Alternatively be like the Java community and just dump
yet another copy of the Python interpreter on their PC and let
the user figure out where all their disk space has gone and how
to fix the PATH conflicts...)

2) Use a packaging tool like Gordon McMillan's installer or py2exe
to bundle up the Python engine plus libraries into a pseudo exe file.
This is better behaved that just installing multiple copies of
Python, but does mean you load the customers machines with lots of
hidden copies and still takes up lots of disk space, which may or
may not be an issue.

3) Just bundle up the program bits they need and provide a link to
the Python site for downloading Python if they need to, (or include
it in a separate folder on your CD...)

Option 1 (with the checks in place) is the most user friendly
option provided your users have the bandwidth to download it.
If your users are computer literate option 3 is second best and
option 2 is only suitable if your users have lots of spare disk
space and bandwidth. For users whjo are short of bandwidth option 3
is best.

Depends on what your user community is like really. As someone who
hates programs that install stuff I don't need I usually use option 3.
But my 'customers' are fellow programmers!

Alan G.

More information about the Tutor mailing list