Mine is the same basic question as this, but the answers there don't help me.
Given this Python script, argv.py
:
import sys
if __name__ == '__main__':
print sys.argv
If I execute it with python argv.py foo
it displays ['argv.py', 'foo']
.
If I execute it with argv.py foo
it displays ['M:\\Projects\\SomaLogic\\CmdLine\\argv.py']
. What I expected here was ['foo']
.
The result of assoc .py
is .py=Python.File
.
The result of ftype Python.File
is Python.File="C:\Python27.10\python.exe" "%1" %*
.
EDIT: added expectation for the failing case.