curses bkgd problem

Gandalf gandalf at
Mon Mar 8 17:07:34 CET 2004

  Hi Python Gurus!

I read the documentation on the python curses module and I started a new 
So far I did this:

stdscr = curses.initscr() # Get standard screen
curses.start_color()      # Uses colors
stdscr.bkgd(' ',curses.COLOR_BLUE ) # Set background of the main window
curses.noecho()           # Do not echo input
curses.cbreak()           # CBreak mode: process keys immediately (no ENTER)
stdscr.keypad(1)          # keypad mode: parse control sequences

However, it is displaying $ characters in black instead of displaying a 
blue background full of spaces.
This must be a problem with my bkgd call since this works fine:

curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)
stdscr.addstr(0, 0, curses.longname(), curses.color_pair(1) )

(writes "X11$terminal$emulator" in the top left corner in red and white).
Please help me out with a few lines of code.

Thanks in advance.


More information about the Python-list mailing list