JoeSox napisaĆ(a):
> 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.
>
>
In Python the value of last statement is stored in special '_' variable.
So to read it just use:
engine.GetVariable("_");
Note that if you precompile your scripts you must set the last argument
of Compile method to true in order for this to work:
engine.Compile(script, true);
Hope this helps,
Szymon Kobalczyk
www.geekswithblogs.net/kobush
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com