> Can somebody explain what I'm doing wrong?
The problem should be in the string passed to os.system
try to print the complete string that you are passing to os.system.
then run a shell and paste the complete string on the shell, I am sure
that the shell will complain about something.
Fabrizio
_
Hi!
I don't know why you want to do that but actually it is possibble.
>>>for i in xrange(1):
...exec( 'var_%s = "var_%s"' %(i,i), locals() )
>>>var_100
'var_100'
Regards.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/l
Did you considered getattr?
> def getAttrs(fooObjs, attr):
> return map(lambda item: getattr(item, attr), fooObjs)
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor