[Urwid] The missing part of my last mail

Rebecca Breu rebecca at rbreu.de
Wed May 31 09:19:20 EDT 2006


Zitat von Ian Ward <ian at excess.org>:

> It seems to work for me.  Maybe the version of Python you're running is
> linked against the curses library, not the ncurses library.

Yeah, you are right:

rbreu at j36> ldd /usr/lib/python2.2/lib-dynload/_cursesmodule.so
/usr/lib/python2.2/lib-dynload/_cursesmodule.so needs:
         /usr/lib/libcurses.a(shr42.o)
         /usr/lib/threads/libc.a(shr.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)

KEY_RESIZE is missing in the curses.h on that machine. However, I'll handle
that AttributeError. Except for resizing, all works OK then.

> The raw_display module should work regardless of which curses is linked
> against Python.

It seems to me that raw_display is more reliable than the (n)curses stuff.
I tried lots of different TERM types on different machines, and with
curses_display I often got a scrambled console, or only black and white
display. Or even worse, the program quitted with something like
"Error opening terminal". Whereas with raw_display, things work almost
always fine.

At the moment I use curses_display by default, with the possibility to
switch to raw_display via command line option. I wonder if I should just
do it the other way round? Does raw_display have any disadvantages I'm not
aware of?

Ian, on the webpage you wrote

    "New raw_display module [...]

    Avoids use of bold text in xterm and gnome-terminal for improved
    text legibility."

Well, when I use raw_display with TERM=xterm, all those colours that
are otherwise displayed in bold style (white, yellow, light cyan etc)
are then displayed in black (which is the default foreground colour). Mmh.
I guess that's not what you intended?


Regards,
Rebecca





More information about the Urwid mailing list