[IronPython] unexpected token print at <string>:1

JoeSox joesox at gmail.com
Fri Mar 3 22:41:24 CET 2006


On 3/3/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
> Evaluate can only parse expressions, not statements (and print is a statement).  If you have a statement you'd like to Execute you should use the Execute function on the engine instead.
>
> These correspond w/ Python's exec statement and the eval built-in function.

Ok, so my next question is

global_eng.Execute("print \"hello\"");

does not return a Stmt.  How do I access it's value?
If I am not mistaken, the return statement is held in the Stmt's value.

--
Joseph



More information about the Ironpython-users mailing list