I'm pretty new to curses but I wrote a working little curses application. But after a while I noticed that my default terminal settings were changed during the session. The background color is a solid black, but I've configured a transparent terminal. Also the color looks more like white than grey.
My code, but I'm sure it's not related to the problem. I'm using debian wheezy with python 2.7.2
#!/usr/bin/env python
import curses
class Monitor:
def __init__(self, screen):
self.screen = screen
self.height, self.width = self.screen.getmaxyx()
self.screen.nodelay(1)
def redraw(self):
self.screen.clear()
self.screen.addstr(1, 1, 'hai')
self.screen.refresh()
def main(self):
while 1:
key = self.screen.getch()
if key == ord('q'): break
self.redraw()
def main(stdscr):
mon = Monitor(stdscr)
mon.main()
if __name__ == '__main__':
try:
curses.wrapper(main)
except KeyboardInterrupt:
pass