Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import curses
- def main(stdscr):
- curses.start_color()
- curses.use_default_colors()
- curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE)
- curses.init_pair(2, curses.COLOR_RED, curses.COLOR_WHITE)
- stdscr.bkgdset(' ', curses.color_pair(1))
- stdscr.clear()
- stdscr.border()
- stdscr.addstr(1, 1, "text should be in red", curses.color_pair(2))
- stdscr.getch()
- curses.wrapper(main)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement