Message5647
Hi,
I have a Jython interpreter embedded in my Java code. My Java program has part of its GUI which emulates a terminal, so when a user types in a command I send it to the InteractiveInterpreter.runsource method to run the command or throw a syntax error or return true if the command is not complete.
When I try the following multi-line command the InteractiveInterpreter returns true when it should report a Syntax Error and return false:
for in range(1,5): <enter>
print i <enter>
a = i <enter>
<enter>
in other words I am calling
myInteractiveInterpreterInstance.runsource("for i in range(5):\n\tprint i\na = i\n\n")
and it returns true |
|
Date |
User |
Action |
Args |
2010-04-08 11:13:48 | richardwoolliscroft | set | messageid: <1270725228.47.0.0108799532254.issue1591@psf.upfronthosting.co.za> |
2010-04-08 11:13:48 | richardwoolliscroft | set | recipients:
+ richardwoolliscroft |
2010-04-08 11:13:48 | richardwoolliscroft | link | issue1591 messages |
2010-04-08 11:13:47 | richardwoolliscroft | create | |
|