def main(stdscr):
curses.start_color()
curses.use_default_colors()
for i in range(0, curses.COLORS):
curses.init_pair(i + 1, i, -1)
try:
for i in range(0, 255):
stdscr.addstr(str(i), curses.color_pair(i))
stdscr.addstr(" ")
except curses.ERR:
# End of screen reached
pass
stdscr.getch()
评论列表
文章目录