getopt question

2010-04-09 Thread Raphael Mayoraz
Ooops, forgot to attach the file in my first e-mail. Now, here it is. Hello, I have some trouble to make getopt.getopt work and the way I want (and is described in the documentation). Attached is very small script to reproduce my proble

getopt question

2010-04-09 Thread Raphael Mayoraz
Hello, I have some trouble to make getopt.getopt work and the way I want (and is described in the documentation). Attached is very small script to reproduce my problem. If running: > python testGetOpt.py -a junk1 -b junk2 everything is ok > python testGetOpt.py -c junk1 ok too: I get the 'In

Re: Variable definition

2010-03-01 Thread Raphael Mayoraz
John Posner wrote: On 2/26/2010 6:32 PM, Raphael Mayoraz wrote: Hello, I'd like to define variables with some specific name that has a common prefix. Something like this: varDic = {'red': 'a', 'green': 'b', 'blue': 'c'} for

Variable definition

2010-02-26 Thread Raphael Mayoraz
Hello, I'd like to define variables with some specific name that has a common prefix. Something like this: varDic = {'red': 'a', 'green': 'b', 'blue': 'c'} for key, value in varDic.iteritems(): 'myPrefix' + key = value I know this is illegal, but there must be a trick somewhere. Thanks,