Message8449

Author emcdowell
Recipients emcdowell
Date 2014-05-20.18:37:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400611061.28.0.866945295253.issue2152@psf.upfronthosting.co.za>
In-reply-to
Content
The raw_input function does not work properly at the REPL in Jython 2.7b2 on java1.8.0_05 on Windows 7 or 8.  It appears to work in scripts.

When raw_input is issued in the REPL the prompt never appears and it is necessary to press CTRL/C or CTRL/Z to abort the read (which also aborts Jython).  Everything works fine when reading using sys.stdin.readline(), the exact opposite of a problem in jython2.7b1 which I reported last year.

Examples:

C:\Users\emcdowell\progs\jython>java -jar jython.jar
Jython 2.7b2 (default:a5bc0032cf79+, Apr 22 2014, 21:20:17)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.8.0_05
>>> import sys
>>> line = sys.stdin.readline()
My input text.
>>> line
'My input text.\n'
>>> # Works!
>>> →


C:\Users\emcdowell\progs\jython>java -jar jython.jar
Jython 2.7b2 (default:a5bc0032cf79+, Apr 22 2014, 21:20:17)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.8.0_05
>>> line = raw_input('Prompt? ')
... My input text.
...
...
...
... →


C:\Users\emcdowell\progs\jython>
History
Date User Action Args
2014-05-20 18:37:41emcdowellsetrecipients: + emcdowell
2014-05-20 18:37:41emcdowellsetmessageid: <1400611061.28.0.866945295253.issue2152@psf.upfronthosting.co.za>
2014-05-20 18:37:41emcdowelllinkissue2152 messages
2014-05-20 18:37:40emcdowellcreate