Message6414

Author jan.koprowski
Recipients jan.koprowski
Date 2011-02-28.20:22:33
SpamBayes Score 6.9493133e-11
Marked as misclassified No
Message-id <1298924553.74.0.830185372436.issue1713@psf.upfronthosting.co.za>
In-reply-to
Content
In attached Java program the goal is evaluate multiline Jython string (containing code) and receive value of this evaluation. For some reason .eval(code) return "None" instead 125. For me it looks like PythonInterpreter evaluate can't handle evaluation of multiline string. This will be nice feature in API - jRuby have ability to evaluate multiline string code with getting result and this i very nice feature.
For now workaround is split lines of code, exec() all except last line of code and pass this last line to eval() - this looks very ugly and complicate code a lot.
History
Date User Action Args
2011-02-28 20:22:33jan.koprowskisetrecipients: + jan.koprowski
2011-02-28 20:22:33jan.koprowskisetmessageid: <1298924553.74.0.830185372436.issue1713@psf.upfronthosting.co.za>
2011-02-28 20:22:33jan.koprowskilinkissue1713 messages
2011-02-28 20:22:33jan.koprowskicreate