If I'm using this with getopt
:
import getopt
import sys
opts,args = getopt.getopt(sys.argv,"a:bc")
print opts
print args
opts
will be empty. No tuples will be created. If however, I'll use sys.argv[1:]
, everything works as expected. I don't understand why that is. Anyone care to explain?