| From | Sent On | Attachments |
|---|---|---|
| Moss Prescott | May 13, 2009 11:40 am | |
| Weiqi Gao | May 13, 2009 12:55 pm | |
| Weiqi Gao | May 13, 2009 1:53 pm | |
| Moss Prescott | May 13, 2009 4:40 pm | |
| Nicholas Riley | May 15, 2009 12:09 pm | |
| Weiqi Gao | May 15, 2009 1:02 pm | |
| Nicholas Riley | May 15, 2009 1:32 pm | |
| Philip Jenvey | May 15, 2009 6:57 pm | |
| Weiqi Gao | May 15, 2009 8:08 pm | |
| Philip Jenvey | May 15, 2009 10:15 pm |
| Subject: | Re: [Jython-users] 2.5rc2, cygwin, and JLine | |
|---|---|---|
| From: | Weiqi Gao (weiq...@speakeasy.net) | |
| Date: | May 15, 2009 8:08:50 pm | |
| List: | net.sourceforge.lists.jython-users | |
Philip Jenvey wrote:
On May 15, 2009, at 1:32 PM, Nicholas Riley wrote:
In article <4A0D...@speakeasy.net>, Weiqi Gao <weiq...@speakeasy.net> wrote:
Here's what works for Cygwin users:
1. Use a DOS prompt and forget about the headaches of Cygwin. 2. Use Cygwin bash in a DOS window: jython.bat works there. 3. Use Cygwin xterm/rxvt/etc. with the modified jython script for interactive session and jython.bat (or unmodified jython) for non-interactive usage.
The ultimate solution of this problem would require two things:
1. Fix JLine so that it works with Cygwin xterm/rxvt/etc. 2. Fix Jython so that it uses the correct JLine Terminal under Cygwin.
I was thinking #2 would make sense. I think it's reasonable to ship some analog to your shell script with the stty/JLine stuff conditionalized to cygwin, as I'd guess the interactive usage scenario is a lot more common.
I've committed a fix for #2. It's basically Weiqi's changes but mostly stolen from JRuby as our script derives from there's (and we try to keep the two in sync):
http://fisheye3.atlassian.com/changelog/jython?cs=6351
Weiqi and other cygwin users, could you download the new jython command line script and give it a shot?
https://jython.svn.sourceforge.net/svnroot/jython/trunk/jython/src/shell/jython
You'll still need the jython -i workaround for the prompt/isatty issue. You can also make that happen via JYTHON_OPTS="-i"
It works as advertised on my Cygwin xterm, Cygwin bash in a CMD window, Cygwin rxvt[*], and Cygwin MinTTY. The Arrow keys, Home, End, C-a/C-e, C-f/C-b, C-n/C-p all work as expected.
[*] The Home/End keys does not work under rxvt.
I still see the stty error messages when doing
echo "print 10" | jython
Redirecting the the error messages to /dev/null should fix that.
Thanks, Philip!
-- Weiqi Gao weiq...@speakeasy.net http://www.weiqigao.com/blog/
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
_______________________________________________ Jython-users mailing list Jyth...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jython-users





