Hi List,
I am getting an index out of range error when trying to parse with getopt.
Probably something simple. Any suggestions are appreciated

optlist, args = getopt.getopt(sys.argv[1:], 'h', ['connectPassword=',
'adminServerURL=', 'action=', 'targets=', 'appDir='])


#Assign Opts
connectPassword = optlist[0][1]
adminServerURL = optlist[1][1]
action = optlist[2][1]
targets = optlist[3][1]
appDir = optlist[4][1]

#this statement never gets executed
print "Args: " + connectPassword + " " + adminServerURL + " " + action
+ " " + targets + " " + appDir

  File "/home/msacks/untitled4.py", line 23, in ?
IndexError: index out of range: 0

TIA
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to