py2exe problem - need wsvc6?

Thomas Heller theller at python.net
Fri Feb 20 02:55:09 EST 2004


> "Aaron" <aaron at metrony.com> wrote in message
> news:40357A5B.5090701 at metrony.com...
>> You do not need a C compiler to make a standalone application.

MSVC6 is *only* required if you want to build py2exe itself from the
sources.  If you install the binary package, you won't need it.  More
below.

>> In version 0.5 the setup.py files changed a bit.
>>
>> First of all can you run your python script on the commandline?
>>
>> I have a hello world app as follows:
>>
>> #pTest.py
>> print "Hello World"
>>
>> #setup.py
>> from distutils.core import setup
>> import py2exe
>> setup(name='Test',
>>        description="a Test",
>>        version='0.1.0',
>>        console=['pTest.py'])
>>
>>
>> #build.bat
>> e:\Python23\python.exe setup.py py2exe
>>
>> Try to build this app and see if your py2exe is setup correctly.

"Elder" <tim at axtelle.com> writes:

> It just opens a window which immediately closes.

What did you expect ;-) ? The exe is a console program, when you
double-click it in the explorer, it opens a console ("command prompt")
window, prints 'Hello, World', and then the console window closes again
- probably faster then you can recognize the output.

To see what this program does, you should open a command prompt window
yourself, navigate (with 'cd directory') to the directory where your exe
file is, and start it by entering 'pTest.exe'.

You can prevent that the console window in the first case closes
immediately by adding a 'raw_input()' call to the script pTest.py at the
end.

Thomas





More information about the Python-list mailing list