i have a file called "test.py" that imports argparse with the simple code:
import argparse
parser = argparse.ArgumentParser(description='Description')
parser.add_argument('-e','--event', help='event', required=True)
args = vars(parser.parse_args())
myArgument = args['event']
from windows if i call it with
python "test.py" -e hello
it works fine but if i try to call it directly with
test.py -e hello
it is calling python but i get an error "-e/--event is required" - i.e. it's not passing the arguments along.
my associations in windows are set up as:
assoc .py
.py=Python.File
ftype Python.File
Python.File = "C:\Python27,python.exe" "%1" %*
Can't seem to figure this out, because i have it working on another computer, so i'm guessing i have some path or environment variable not set up right?
Thanks in advance