When using the getopt.getopt() function in my python script the temp return value stays empty. What am I missing.
def ParseOpts(cmdName):
shortForm = 'c:n:';
longForm = 'cluster=,node='.split(',');
try:
print sys.argv;
temp, args = getopt.getopt(sys.argv, shortForm, longForm);
print temp;
except getopt.GetoptError:
print 'error !!'
Command:
$ python helloWorld.py --cluster=Test --node=Test2
['helloWorld.py', '--cluster=Test', '--node=Test2']
[]