Windows versions of Python---pros and cons?

Piet van Oostrum piet at cs.uu.nl
Mon Jun 24 07:51:00 EDT 2002


>>>>> "P. Alejandro Lopez-Valencia" <dradul at yahoo.com> (PAL) writes:

PAL> "Mark Hammond" <mhammond at skippinet.com.au> escribió en el mensaje
PAL> news:3D125B79.6090903 at skippinet.com.au...
>> Chris Barker wrote:
>> 
>> > On that note: does anyone know if there is a way to turn a Python
PAL> script
>> > into something that acts like an application on Windows...without
>> > resorting to Py2exe and the like. What I want is something just
PAL> like:
>> 
>> Add the .py extension to your PATHEXT environment variable, and you
PAL> can
>> execute "foo.py" at the command prompt.  Like much of Windows, this is
>> based on the extension rather than file attributes.

PAL> Ehem! :) This only works in WINNT class OSs that use cmd.exe as their
PAL> default command line processor. Lowly DOS32 OSs such as the Win98
PAL> mentioned by the OP, that only have command.com, just can't.

In that case use a program like PythonLauncher, which allows you to make a
small .exe file for each Python script (just copy the generic program to
script.exe where script is your script name (minus the .py extension).
This has the additional advantage of properly redirecting I/O from the
command line, which isn't the case with the other suggestions.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl



More information about the Python-list mailing list