Command line arguments in Windows

Mike Walker mhwalker at shaw.ca
Tue Mar 4 01:38:15 EST 2008


> If you run a python file, ie. just double clicking it the only
> argument you will have will be the filename of the script.  If you
> create a shortcut to the script and in the target box add your
> arguments (if you have quotation marks place them after not inside)
> you will see your arguments.  fwiw you answered yourself in the third
> paragraph.

As I mentioned I am working from the command line, not clicking on the icon. 
The only difference between it working and not is the python prefix, which 
is why I was thinking this is some sort of file association problem.

I probably wasn't as clear as I could have been in the third paragraph.

argtest.py arg1 arg2 arg3 - Does not work only get sys.argv[0]
python argtest.py arg1 arg2 arg3 - Works 




More information about the Python-list mailing list