In Windows console if I execute this script (test.py
):
import sys
print(sys.argv)
like:
>python test.py my args
I get expected output:
['test.py', 'my', 'args']
but if I call it directly, like this:
>test.py my args
I get: ['C:\\temp\\test.py']
output, as if I didn't pass any arguments. Why?
FYI:
>assoc | findstr .py=
.py=Python.File
>ftype Python.File
Python.File=C:\Python35\python.exe "%1" %*