Command-line does work when scheduled

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Sep 29 22:45:59 EDT 2007


En Sat, 29 Sep 2007 22:04:06 -0300, Jim <jscrerar at compuserve.com> escribi�:

>> If it works this way, maybe the .py file extension is not correctly
>> registered.
>
> Yes, it works this way.
> How do I register the .py extension correctly?

 From a command line, type:
assoc .py
You should get:
.py=Python.File
If you get an error, or another thing like py_auto_file:
assoc .py=Python.File

Then:
ftype Python.File
You should get:
Python.File=c:\path\to\python.exe "%1" %*
If you don't:
ftype Python.File=c:\path\to\python.exe "%1" %*

The %* at the end is important: if you created the association by using  
"Open with...", or selecting Python from the list of installed programs,  
very likely the command says only "%1" - that is, the script being open,  
but without any additional arguments.

Better if you have administrative rights to do this tasks.

-- 
Gabriel Genellina




More information about the Python-list mailing list