How to deactivate JLine for Jython interactive interpreter session?
Question
Jython 2.5 comes with JLine per default.
I would prefer to use the interactive interpreter with rlwrap. It seems that rlwrap is not working if JLine is active.
In Scala I would use rlwrap scala -Xnojline
.
Is there a similar option for Jython to deactivate JLine?
Solution
You can set the jython property python.console to org.python.util.InteractiveConsole. This was the default in Jython 2.2 and is a simple history-less console. You can set this property via the command line like:
jython -Dpython.console=org.python.util.InteractiveConsole
or change the property in your local registry. See http://wiki.python.org/jython/UserGuide#the-jython-registry
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow