Windows versions of Python---pros and cons?

Trent Mick trentm at ActiveState.com
Fri Jun 21 14:19:53 EDT 2002


[Bjorn Pettersen wrote]
> > From: Chris Barker [mailto:Chris.Barker at noaa.gov] 
> [snip]
> > 
> > On that note: does anyone know if there is a way to turn a 
> > Python script into something that acts like an application on 
> > Windows...without resorting to Py2exe and the like. What I 
> > want is something just like:
> > 
> > chmod +x scriptname
> > and a #! line at the top 
> > 
> > on Unix. I want it to work on the windows command line.
> 
> If you use the ActiveState version (not sure about the python.org
> version) this should work out-of-the-box. Just type the name of the
> script, you can even leave out the .py extension. Someone else will
> probably tell you how it works, I just know it's got something to do
> with registering the .py extension as an executable extension in the
> registry...

As Mark Hammond mentioned, this is done by adding .py to your PATHEXT
env. var. ActivePython does that (and .pyc, .pyo, .pyw, .pys as well).

Trent

-- 
Trent Mick
TrentM at ActiveState.com





More information about the Python-list mailing list