newbie py2exe difficulty

Elaine Jackson elainejackson7355 at home.com
Fri Jan 30 09:19:59 CET 2004


Hi. I'm trying to use py2exe (http://starship.python.net/crew/theller/py2exe/)
in Windows 98. I copied the necessary files into my Python23 directory (where I
have a module called 'mastermind.py'), and in the same directory I saved a
Python source file called 'setup.py' containing the following text:

from distutils.core import setup
import py2exe
setup(console=["mastermind.py"])

At this point the instructions say the following:

"""
Running

python setup.py py2exe --help

will display all available command-line flags to the py2exe command.

Now you can call the setup script like in this way:

python setup.py py2exe

and a subdirectory dist will be created, containing the files myscript.exe,
python23.dll, and library.zip.
"""

My problem is that, when I attempt to follow the first instruction (details
follow), it opens a DOS window that may indeed display all available
command-line flags to the py2exe command, but isn't very helpful because it
immediately disappears. (In fact I'm really not sure what a command-line flag
is, or what I'm supposed to do with it.) I've also tried simply running
setup.py: the DOS window disappeared immediately and there was no 'dist'
directory in evidence.

Here is what I tried regarding the first instruction:

i) Creating a shortcut to setup.py, setting its 'target' property to
'C:\Python23\setup.py --help', and double-clicking on its icon.

i) Setup | Run... | C:\Python23\python.exe setup.py py2exe --help | OK

Any help with this problem will be very much appreciated. Knowing how to create
standalone executables would give me lots of incentive to keep learning more
Python (which, incidentally, rocks).

Peace





More information about the Python-list mailing list