For loop

Boris Ottlewski Boris.Ottlewski at NOSPAMsystemsoft.de
Wed Mar 15 06:05:39 EST 2000


Hello,

I got this code snipet: (See the colons!)

for a in i.something():
     for cf in a.somethingelse():
          print cf.property

It works in python.exe (shell). How do I use this in embedded python? When a
build a string with this code and do a Py_RunSimpleString() it raises a
syntax error. Is there an alternative syntax? Is the colon someting just
known to the python shell?

regards

Boris Ottlewski - SystemSoft





More information about the Python-list mailing list