Advertisement
Guest User

Untitled

a guest
Jun 13th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import curses
  2.  
  3. def main(stdscr):
  4.     curses.start_color()
  5.     curses.use_default_colors()
  6.     curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
  7.     curses.init_pair(2, curses.COLOR_RED, curses.COLOR_WHITE)
  8.  
  9.     stdscr.bkgdset(' ', curses.color_pair(1))
  10.     stdscr.clear()
  11.     stdscr.border()
  12.     stdscr.addstr(1, 1, "text should be in red", curses.color_pair(2))
  13.     stdscr.getch()
  14.  
  15. curses.wrapper(main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement