Message5647

Author richardwoolliscroft
Recipients richardwoolliscroft
Date 2010-04-08.11:13:47
SpamBayes Score 7.9217985e-05
Marked as misclassified No
Message-id <1270725228.47.0.0108799532254.issue1591@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-04-08 11:13:48richardwoolliscroftsetmessageid: <1270725228.47.0.0108799532254.issue1591@psf.upfronthosting.co.za>
2010-04-08 11:13:48richardwoolliscroftsetrecipients: + richardwoolliscroft
2010-04-08 11:13:48richardwoolliscroftlinkissue1591 messages
2010-04-08 11:13:47richardwoolliscroftcreate