From: Jan K. <re...@bu...> - 2011-02-28 20:22:41
|
New submission from Jan Koprowski <jan...@gm...>: 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. ---------- components: Jythonc compiler files: NiceJython.java messages: 6414 nosy: jan.koprowski severity: normal status: open title: PythonInterpreter.eval doesn't work with multiline string properly versions: 25rc4 Added file: http://bugs.jython.org/file950/NiceJython.java _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1713> _______________________________________ |