[IPython-dev] Old 'broken terminal' bug finally fixed

Fernando Perez fperez.net@gmail....
Fri Apr 18 17:11:51 CDT 2008


Hi all,

there's a very old, *extremely* annoying bug that multiple people have
asked about (on list and in person) that is finally just fixed.  The
behavior was that at some point during a normal session, after a call
to 'foo?', your terminal would be totally messed up, with no displayed
input.  You could (blindly) type !reset to issue the system terminal
reset command, but that would only help until the next time foo? was
called, and the problem would then return.  Most of us would end up
just quitting ipython and restarting, often losing useful session
state.

The problem with this is that we never knew how to reliably reproduce
it...  Anyway, it's fixed now in current bzr:

http://bazaar.launchpad.net/~ipython/ipython/stable-dev/revision/79

I don't actually know how to trigger it, but it hit me during an
important session where I really couldn't afford to lose what I was
working on, and I managed to track it down to what I'm pretty sure is
a curses bug.  Basically curses.initscr() fails to correctly
initialize the terminal sometimes (I still don't have a clue why), and
after that it's all lost.  But it turns out that via termios one can
in fact reset the terminal state reliably , so now we unconditionally
do that.

Anyway, I figured this would be worth mentioning here, since I know
the problem is one that quite often bites people in the middle of work
sessions an it can be very, very annoying.

Cheers,

f

back to what I was busy doing, with my terminal now fully functional again... :)


More information about the IPython-dev mailing list