Re: [Tutor] Hi, need help on zip commands for windows

2006-07-15 Thread Fabrizio Milo aka misto
> 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 _

Re: [Tutor] create 1000 000 variables

2006-07-15 Thread Fabrizio Milo aka misto
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

Re: [Tutor] dynamically executing a statement

2006-07-14 Thread Fabrizio Milo aka misto
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