Command line arguments in Windows

Mike Walker mhwalker at
Tue Mar 4 08:45:31 CET 2008

"Mark Tolonen" <mark.e.tolonen at> wrote in message 
news:of6dnVTvVvGtalHanZ2dnUVZ_uCdnZ2d at
> From the command line, the 'ftype' and 'assoc' commands can be used
> view how an extension is handled:
>   C:\>assoc .py
>   .py=Python.File
>   C:\>ftype Python.File
>   Python.File="C:\Python25\python.exe" "%1" %*
> My guess is your command line looks something like this:
>   Python.File="C:\Python25\python.exe" "%1"
> The script name is being passed, but not the rest of the arguments.
> I vaguely remember seeing this on an older version one of ActiveState's
> ActivePython installers.  What version of Python are you running?
> --Mark

Here is the output from the commands you listed which looks right to me.

C:\>assoc .py

C:\>ftype python.file
python.file="C:\Python25\python.exe" "%1" %*

I am using Python 2.5.2 from running on Windows 
Vista. Would ActiveState's version be a better choice here?


More information about the Python-list mailing list