atom feed10 messages in net.sourceforge.lists.jython-usersRe: [Jython-users] 2.5rc2, cygwin, an...
FromSent OnAttachments
Moss PrescottMay 13, 2009 11:40 am 
Weiqi GaoMay 13, 2009 12:55 pm 
Weiqi GaoMay 13, 2009 1:53 pm 
Moss PrescottMay 13, 2009 4:40 pm 
Nicholas RileyMay 15, 2009 12:09 pm 
Weiqi GaoMay 15, 2009 1:02 pm 
Nicholas RileyMay 15, 2009 1:32 pm 
Philip JenveyMay 15, 2009 6:57 pm 
Weiqi GaoMay 15, 2009 8:08 pm 
Philip JenveyMay 15, 2009 10:15 pm 
Subject:Re: [Jython-users] 2.5rc2, cygwin, and JLine
From:Weiqi Gao (
Date:May 13, 2009 1:53:39 pm

Here's my modified version of the jython shell script:

My changes are limited to

1) the CP_DELIMITER change;

2) bracketed the actuall java command with

stty -icanon min 1 -echo


stty icanon echo

3) modified the java command line to run "jline.ConsoleRunner org.python.util.jython" instead of "org.python.util.jython";

4) added two properties to the java command line: "-Dpython.console=org.python.util.InteractiveConsole" and "-Djline.terminal=jline.UnixTerminal";

5) added "-i" to JYTHON_OPTS so that the prompts gets printed.

I have verified that this works in one of my Cygwin xterms. I can do bash/emacs-style command line editing (C-a/C-e, C-f/C-b, C-p/C-n) without any problems. The Home, End, and Arrow keys also work as expected.

I'm seeing all the problems that you describe. If you select to install the source, then you can fish out the jython shell script from the src/shell/ directory. Copy it into the bin/ directory and change the line that says:




and the script is good to go.

I use jython from a Cygwin xterm and in general JLine's jline.WindowsTerminal does not work there. The jline.UnixTerminal can be made to work in Cygwin xterm. And I've made tweaks to JRuby, Groovy, and Clojure startup script so that command line editing is possible for me with these languages.


for details.

The garbled edits that you see are most likely caused by the use of jline.WindowsTerminal inside a Cygwin xterm.

And yes, there are other Cygwin users out there, some of us use Jython.

------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled.