Make an *.EXE Using Python.

Nick Perkins nperkins7 at
Thu Jul 19 05:34:44 CEST 2001

I am no expert, but here's how it worked for me:

First, you need to write a '' script.  Here's one of mine:
My program is just the one file (, so this very simple setup will
do the trick.

from distutils.core import setup
import py2exe


This is in a file called '', in the same dir as my prog.
Then you run this setup program, and give it the argument 'py2exe'.
To give the argument from the dos prompt, (not the >>> prompt) type:

python py2exe    (from the right directory)

If you run the script from within PythonWin, you can type 'py2exe'
in the dialog that pops up when you hit F5 (run).

The setup will run for a long time, produce a huge amount of text output,
including many error messages that you can ignore, and then produce a
directory containing some .dll's and an .exe

That is it.  You can run the .exe.  You can zip up the whole dir and send it
to your friend (who doesn't have python installed), and say "hey, here's a
program I wrote!"

"G. Willoughby" <thecalm at> wrote in message
news:9j2en5$q15$1 at
> have you any examples on how to use py2exe???
> Gary.
> "Nick Perkins" <nperkins7 at> wrote in message
> news:E3K17.433170$eK2.87951585 at
> > You need py2exe:
> >
> >
> >
> >
> > "EricIDLE" <grayson-wilson at> wrote in message
> > news:oAI17.647550$166.13393459 at
> > > Hello,
> > > I was wondering is there a way to make a exe using Python?
> > > I seem to remeber vagely that there was a "Make EXE" choice under the
> file
> > > menu but its no longer there (If it ever was) so if you can give me a
> hand
> > > with this it would be great.
> > >
> > >
> >
> >

More information about the Python-list mailing list