Replacing curses

Donn Cave donn at u.washington.edu
Wed Feb 8 19:48:01 EST 2006


In article <11ul2eskh5q2pab at corp.supernews.com>,
 Thomas Dickey <dickey at saltmine.radix.net> wrote:

> Ian Ward <ian at excess.org> wrote:
...
> > Also, screen resizing only seems to be reported once by getch() even if
> > the user continues to resize the window.  I have worked around this by
> > calling curses.doupdate() between calls to getch(). Maybe this is by 
> > design?
> 
> Or perhaps it's some interaction with python - I don't know.
> The applications that I use with resizing (and ncurses' test
> programs) work smoothly enough.

I have no idea about the present application, but just as a
general observation, when Python traps a signal, it saves
the signal number, and makes a note to check for trapped signals
as the next Python operation.  That check iterates through the
list of possible signals to see if any have been caught, and
execute their respective handlers if any.

Since an external function call is an operation, no signal
handler will execute until it returns.  At that time, the
signal handler will execute once, at most.

> > Finally, the curses escape sequence detection could be broadened. The
> > top part of the curses_display module in Urwid defines many escape
> > sequences I've run into that curses doesn't detect.
> 
> That's data (terminfo).  ncurses is data-driven, doesn't "detect"
> features of the terminal (though it does of course use environment
> variables for locale, etc.).
> 
> xterm's terminfo lists a lot of function keys, for instance.

This is just my opinion, but any application that depends
on function keys in terminfo is broken, automatically.
Optional support for function keys is a nice touch, but the
data isn't good enough out there to depend on it.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list