Easy way to make EXEs...

Lucas Raab pythongnome at hotmail.com
Thu Jan 29 20:09:11 EST 2004


"Xero Limit 126" <xerolimit126 at earthlink.net> wrote in message
news:NMDRb.28013$i4.26542 at newsread1.news.atl.earthlink.net...
> Okay, I am completely new to Python, and I really dont understand much,
but
> I was wondering how to make a python script/program into a standalone
.EXE?
> I dont understand py2exe at all, so if someone could tell me or find me an
> easy (For a newbie) to convert Python scripts to EXEs, please let me know!
>
> Thanks for any help!
>
>
You should have no trouble with py2exe at all. A simple setup script would
be:

#setup.py
from distutils.core import setup
import py2exe

setup(name="myfile.py",
      scripts=["myfile.py"],
      )

Then to compile that file, go to the command prompt and switch to the
directory that the file is in. For example on my machine I would do the
following:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Lucas Raab>cd C:\Python23

C:\Python23>python setup.py py2exe

Wait a few moments for py2exe to compile your script and Voilla!! you have
an executable.





More information about the Python-list mailing list