Issue1962

classification
Title: Interactive console in Jython 2.5.3 needs CRTL-D to execute command
Type: behaviour Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: alex, alex.gronholm, amak, dfeinberg, fwierzbicki
Priority: normal Keywords:

Created on 2012-08-24.08:48:08 by alex, last changed 2013-02-07.20:58:27 by fwierzbicki.

Messages
msg7421 (view) Author: A. Fox (alex) Date: 2012-08-24.08:48:07
Jython shell interactive console doesn't evaluate expression when typing "RETURN", instead CRTL-d must be typed. This occurs in Jython 2.5.3 release.

Steps to reproduce:
1. Start jython shell
2. Type 'print "Hello World"
3. Type RETURN twice
4. Type CRTL-d

Output of Jython 2.5.3b1 that works fine:
# jython 
Jython 2.5.3b1 (2.5:5fa0a5810b25, Feb 22 2012, 12:39:02) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello World"
Hello World
>>> 
>>> 
-> Jython interpreter is left and returned to te invoking shell

Output of Jython 2.5.3:
# jython 
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:48:36) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_03
Type "help", "copyright", "credits" or "license" for more information.
>>> print "Hello World"

Hello World
>>> >>> 
-> Still in interpreter
msg7425 (view) Author: Alan Kennedy (amak) Date: 2012-08-25.21:08:35
What platform is this on?

Are you using the default console? 

Have you tried different settings for the console in the registry file?
msg7426 (view) Author: A. Fox (alex) Date: 2012-08-25.22:00:36
I am on Debian Squeeze 64 bit.

The problem seems to be caused by this line of my registry file:
python.console=org.python.util.InteractiveConsole

After commenting it out, it works as before.
msg7470 (view) Author: Daniel (dfeinberg) Date: 2012-10-05.02:29:57
I observe similar behavior on Windows. Downgrade to 2.5.0 fixes the problem.
msg7491 (view) Author: Alex Grönholm (alex.gronholm) Date: 2012-10-27.23:00:45
Jython 2.5.3 ships with the legacy console line commented out by default. Did you turn it on manually or did you simply copy the old registry file from an older Jython version?
msg7496 (view) Author: A. Fox (alex) Date: 2012-10-29.19:54:49
I changed the registry file as described in http://wiki.python.org/jython/ReadlineSetup 

As far as I see the InteractiveConsole is not deprecated, so I assume that InteractiveConsole is not "legacy": http://www.jython.org/javadoc/org/python/util/InteractiveConsole.html

Using the jline setup of the wiki results in a similar issue as with InteractiveConsole (needs CRTL-D to evaluate).
msg7640 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-07.20:52:14
Fixed in http://hg.python.org/jython/rev/ba4ec099655d Now I just need to roll a 2.5.4 rc and make sure I didn't break the app at my job :O

If I did break it then that will delay a final for sure.
History
Date User Action Args
2013-02-07 20:58:27fwierzbickisetpriority: normal
2013-02-07 20:52:53fwierzbickisetstatus: open -> closed
assignee: amak -> fwierzbicki
resolution: fixed
2013-02-07 20:52:14fwierzbickisetnosy: + fwierzbicki
messages: + msg7640
2012-10-29 19:54:50alexsetmessages: + msg7496
2012-10-27 23:00:45alex.gronholmsetnosy: + alex.gronholm
messages: + msg7491
2012-10-05 02:29:58dfeinbergsetnosy: + dfeinberg
messages: + msg7470
2012-08-25 22:00:36alexsetmessages: + msg7426
2012-08-25 21:08:35amaksetassignee: amak
messages: + msg7425
nosy: + amak
2012-08-24 08:48:08alexcreate