I can call my script like this:
python D:\\myscript.py 60
And in the script I can do:
arg = sys.argv[1] foo(arg)
if len(sys.argv) < 2: print "You must set argument!!!"
for arg in sys.argv: print (arg) #print cli arguments
You can use it to store the argument in list and used them. Is more safe way than to used them like this sys.argv[n]
sys.argv[n]
No problems if no arguments are given