Python application deployment?

Dennis Reinhardt DennisR at dair.com
Fri Apr 11 09:41:25 EDT 2003


> Is there a way to deploy the Python "runtime" with your Python
> scripts?  ... Windows ... smaller than 7 MB download
Check out my 800 KB download at http://www.spamai.com/eval.php  By
installing it, you will see the directory structure and files included.  The
key statements to have Python use the installed structure are:

    import sys
    sys.path = [".", ".\\bin", ".\\bin\\libstd", ".\\bin\\libxtra"]

Look at the /bin directory and its subdirectories to see how these
statements map to files distributed.

I do not have a GUI package.  I include an custom http server in above 800
KB and use dynamic web pages for  user interface.  Including a GUI package
will surely push the download byte count higher.

As far as tools to decide what to include, Python itself will write the .pyc
files it needs.  You simply include those files in what you distribute.  I
use WinRAR (http://www.rarlabs.com/ - $29) for self-extracting compression
and TinySetup (http://www.tinysetup.com - no cost).

> In other words, it would be nice
> to be able to simply unzip the files needed to run my scripts without
> the user having to download and install the full Python windows setup,
> and then download and install my Python scripts seperately.
Too error prone, IMO.  At 800 KB combined, it is preferable to simply
combine them.  In the rare case where someone already has Python installed,
I still want to install an embedded version so that I know exactly what the
Python operating environment is.
--

Dennis Reinhardt

DennisR at dair.com
http://www.spamai.com






More information about the Python-list mailing list