[IPython-user] turn off screen clearing?
fperez at colorado.edu
Mon Jun 30 18:57:40 CDT 2003
Keith Beattie wrote:
> On 06/30/2003 09:11 AM, Fernando Perez wrote:
>> So I'm a bit puzzled by the behavior you describe. Hopefully with a bit
>> more info we should be able to track it down.
> Well, I dug around and actually found a places where it doesn't happen!
> I've installed ipython in two locations, at home and at work.
> Hope this helps, and let me know what else I can do to help debug it. For
> now, I guess I'll use Konsole or Gnome-terminal with ipython.
Well, as far as I can see, it seems to be a problem with curses. FWIW, under
Redhat 8.0 + KDE I don't see it, whether using Konsole or xterm. However, I
_do_ see it if I ssh onto a Solaris server (from any terminal).
The problem is caused by a single call to curses.endwin() in line 874 of
IPython.genutils, in the page() function used to display output. This call is
necessary to restore the terminal state, but under Solaris it immediately
floods the terminal with output until the bottom of the page.
As far as I can tell, this behavior should be considered a bug. However, I
can't say whether it's a bug in python's curses implementation, or in some
underlying system library in Solaris.
So sorry, but this one is outside of my control. And I can't really work
around it by not calling endwin(), since that would completely bork the terminals.
However, there _is_ a way for you to work around it at the user level. If you
set TERM to 'dumb' before starting ipython, this will completely disable any
use of curses. Note, however, that this causes you to lose the ability to
clear the screen and potentially will cause problems with other programs which
need a 'smart' terminal.
So unless someone has any further insights into this issue, I'm afraid this
annoying behavior will stay in the ipython code. But I find it rather ugly,
so I'm open to further comments. With a good argument, I'll be convinced to
write in workaround code for future versions.
More information about the IPython-user