Creating EXE file from Python
junkster at rochester.rr.com
Thu Sep 13 03:12:22 CEST 2001
In article <9nnimb02gcj at enews1.newsguy.com>,
"Alex Martelli" <aleax at aleax.it> wrote:
> "Benjamin Schollnick" <junkster at rochester.rr.com> wrote in message
> news:junkster-928BC2.05490412092001 at typhoon4-0.nyroc.rr.com...
> > Run, don't walk and pick up Gordon Mcmillians Installer package.
> > Very versatile, and generally simple....
> > PY2EXE is also another choice, but it's more complicated than
> > the Installer package.
> My impression of these two excellent packages is just the
> reverse -- I see py2exe as much simpler, since it fits in
> the distutils framework, which is so indispensable anyway.
> If my application doesn't do anything funny, I just stick
> an import py2exe in the setup.py I would have for it anyway,
> and voila, I can now build a self-contained Windows EXE as
> well as all the other forms for deployment.
> OTOH, Gordon's installer also supports non-Windows platforms,
> which is a VERY nice plus of course:-).
It depends....I guess on your view point.
I took a look at the PY2EXE documentation, and was rather confused.
I've never used distutils until I tried PY2EXE, and spent over an hour
trying to figure things out.
Gordon's documentation is quite clear with 3 different OBVIOUS styles of
Standalone.py - Produces a directory containing yoursrcipt.exe and all
the dlls and pyds it requires. This is generally the easiest
and certainly the simplest configuration to modify.
Simple.py - A single file that when executed, will unpack itself into a
user chosen directory - like using Standalone and then packaging
the directory in a self-extracting exe. But if you want a
professional look, use Standalone and a real Installer / setup
Freeze.py - A single file executable. Actually, it unpacks itself at
runtime, and cleans up when the run is done. Not very efficient,
but definitely the easiest for the user to deal with.
In 90% of the cases, all you need to do is run the python script with a
command line argument of the program to "EXE". I rarely have to
(But never the less, Gordon goes heavily into how to modify the
configuration file to optimize or tweak the way it works... I think that
most people see that material and start to think that the customization
My it's just my Python v1.5x way of thinking, but it's simple quick and
easy to use.
Whenever I've had a problem or question, Gordon's usually been
*EXTREMELY* fast at getting back to me... In the last 2 days, I've been
doing some *ODD* experimentation, and he's received everyone of my
suggestions & questions, with a patient ear and a quick turn around...
I suppose that PY2EXE is more Python v2.x "official" via distutils, as I
mentioned it doesn't seem to be too programmer friendly. Or at least, I
certainly had issues with it...
Never the less, your mileage may vary. To each their own....
More information about the Python-list