myscript args
instead of
myscript.py args
you can wrap the python script inside a *.bat file. Say you want to run myscript.py and it takes two arguments, make the following batch DOS file:
myscript.py %1 %2
The percentage+number things play the role of sys.argv in Python such that command line arguemnts are piped through to the Python script.
Add .py to your PATHEXT environment variable and you can run Python files at the command line without the extension. No need to wrap in a batch file.
ReplyDeleteAh... good point. (I come from the other camp... just playing with Windows now and then. Thanks!)
ReplyDelete