curses and use_default_colors()

Chris Reay mrchameleon at hotmail.com
Tue Jul 29 22:43:22 EDT 2003


Brian Victor <bhv1 at psu.edu> wrote in message news:<slrnbidnj4.koh.bhv1 at pa-steclge-u3-c3b-133.stcgpa.adelphia.net>...
> I am attempting to write a curses-based program.  I would like to use
> the default terminal background rather than a black one (a significant
> difference with transluscent terminals, regardless of one's opinion of
> them).
<snip>

I don't know how much this'll help, but my home-brewed curses TextApp
class has a white-on-blue default, and TextApp.startWin() contains
these lines (inter alia) ...

# ... blah, blah, blah.
curses.start_color()
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
# ... blah, blah, blah ...
self.scrn = self.stdscr.subwin(self.height, self.width, 0, 0)
self.scrn.bkgd(curses.color_pair(1))
# Blah, blah, blah ...

Fwiw

Chris




More information about the Python-list mailing list