Command-line does work when scheduled

Jim jscrerar at compuserve.com
Sun Sep 30 16:42:56 CEST 2007


On Sep 29, 8:45 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Sat, 29 Sep 2007 22:04:06 -0300, Jim <jscre... 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

I believe I get the correct results as follows:
==============================================
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

J:\Jim Crerar\mypython\misc>assoc .py
.py=Python.File

J:\Jim Crerar\mypython\misc>ftype Python.File
Python.File="E:\Python25\python.exe" "%1" %*

J:\Jim Crerar\mypython\misc>
===============================================
What else could be wrong?
Thanks,
Jim




More information about the Python-list mailing list