Windows and python execution

Peter Hansen peter at engcorp.com
Thu Dec 29 23:51:23 EST 2005


Thorsten Kampe wrote:
> If you installed Python the normal way, .py files are already
> associated with Python. Windows uses the registry and doesn't make any
> difference whether you doubleclick a file or type the name on the
> command line

The difference is whether you can execute the script by typing 
"scriptname.py" or merely "scriptname".  With the "set .py" approach 
Mark was mentioning, even though it's not supported by vanilla Windows, 
you can do the latter.  Same with setting the PATHEXT environment 
variable, which the ActivePython distribution apparently does.  The 
"normal way" of installing Python does *not* set enable this, requiring 
you to execute scripts with the full "scriptname.py".

-Peter




More information about the Python-list mailing list