mkotyk / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

IronPython Interactive Shell Support #311

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Yes, I've seen Issue 56 and I don't think this is quite the same because 
running ipy (the Iron Python executable) in a CygWin window correctly brings up 
the interactive interpreter as expected.  The problem seems to be that it's not 
getting key press events/signals it needs to get to function normally.

First example: hitting the up arrow actually moves the cursor up rather than 
telling the interpreter that it needs to go through the command history.  It 
does add something to the input buffer because pressing the up arrow and then 
entering a valid statement produces a parse error, so something is getting 
through.  Just not the right thing or at least not the thing ipy was expecting.

Second: Ctrl-<anything> does nothing, which is a problem for several reasons.  
It makes exiting the interpreter annoying, but more importantly, it makes 
killing the interpreter without losing the whole CygWin terminal impossible.  I 
just tried - killing the process from the task manager causes the Bash shell to 
kill itself, and obviously the normal Ctrl-C wasn't doing anything.

Third: tab characters can be deleted, but the cursor only goes back one space, 
so you end up with a visually confusing thee space indent.  That's not a 
serious problem, but it's annoying.

There are probably others I'm missing, but hopefully that provides a decent 
idea of the scope of the changes needed.

Original issue reported on code.google.com by dtander...@gmail.com on 20 Jan 2012 at 7:22

GoogleCodeExporter commented 8 years ago
This is issue 56 alright. A Cygwin console is a Windows console, so native 
console programs work fine there. With mintty, that's not the case. The various 
problems you're seeing there is due to the Cygwin pseudo terminal (pty) driver 
buffering and echoing back keypresses. An interactive Cygwin program would 
usually disable that (using the POSIX function tcsetattr(), but of course a 
Windows program such as IronPython doesn't know anything about that.

Original comment by andy.koppe on 24 Feb 2012 at 6:09