Message7780
We need to be able to differentiate between statements and expressions before deciding whether to call "eval" or "exec" on the jython intepreter.
The ast.parse() function might be one way to do it
Jython 2.7b1+ (default:a30708945630, Feb 23 2013, 15:22:29)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_41
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> ast.parse("x=7").body
[Assign]
>>> ast.parse("7").body
[Expr]
>>> |
|
Date |
User |
Action |
Args |
2013-02-26 00:29:53 | amak | set | messageid: <1361838593.38.0.808174331978.issue1798@psf.upfronthosting.co.za> |
2013-02-26 00:29:53 | amak | set | recipients:
+ amak, fwierzbicki, dturanski |
2013-02-26 00:29:53 | amak | link | issue1798 messages |
2013-02-26 00:29:53 | amak | create | |
|