minimum python for distribution on Windows
hmm at iki.fi
Thu Mar 20 14:09:13 CET 2003
bobnotbob at byu.edu (Bob Roberts) writes:
> I just tried out py2exe, and it worked great. Is it possible to do
> something similar, but with my python source code still available (and
> able to be modified)?
> I tried just copying my source code, python.exe, and the modules I use
> into a new directory, but it keeps complaining about not having a lot
> of modules, such as "site", that I never imported.
I have been doing this with Tools/freeze/freeze.py but py2exe might be
actually better. Anyway, instead of freezing your own script, try freezing
this to get a single-file python interpreter:
# add here all the modules your script will use
import sys, os
# the first argument is the name of the script to run
# no arguments, start interactive interpreter
The downside is of course, that you must list all the modules you are
going to need beforehand in this script.
I have done a product installation script using this method, you can
start python directly from the install-directory by just something
like: "./spython install.py". Of course the whole install.py can be frozen,
but this way it is more easy to change and debug.
I have made a small page about this technic at
Markku Hänninen /
hmm at iki.fi / "Actually it works, it just doesn't look that way."
More information about the Python-list