May 27, 2008
12:52 p.m.
Hello,
I embedded Python in an application to play with some objects. I want to add some features to my console and I don't find how to evaluate in the same way the Python console does.
I want to let the user insert a: for a in [1,2,3]:
and I want to put the '...' like the console but if I evaluate the 'for a in [1,2,3]:\n' using PyRun_SimpleString I get an error:
File "<string>", line 1 for a in [1,2,3]: ^ SyntaxError: unexpected EOF while parsing
Is there any way to evaluate in the same way the console does?
Thanks in advance, Pablo Yabo