Windows and python execution

Peter Hansen peter at engcorp.com
Tue Dec 27 06:29:12 EST 2005


BartlebyScrivener wrote:
>>>What you need to do is include the following line in autoexec.bat:
>>>set .py=c:\python24\python.exe
> 
> 
> Whatever works for you. I don't have that command in my autoexec.bat
> file and my python scripts execute from any location because the
> directory they are stored in is in my PATH variable.

But only because you type "python scriptname.py" instead of just 
"scriptname.py", right?  Or because something or someone (I don't 
believe the standard distribution does this) changed the PATHEXT 
environment variable to contain ".PY" somewhere.

Merely adding the folder containing the EXE to PATH does *not* let you 
avoid typing "python" before the script name, as your posts imply.

-Peter




More information about the Python-list mailing list