Commit 1bd9f78f authored by mathieui's avatar mathieui

Improve src/theming.py (print the colors and do not pollute the terminal)

parent 828f60fc
......@@ -516,7 +516,16 @@ if __name__ == '__main__':
s = curses.initscr()
curses.start_color()
curses.use_default_colors()
s.addstr('%s' % curses.COLORS, to_curses_attr((3, -1, 'a')))
s.addstr('%s colors detected\n\n' % curses.COLORS, to_curses_attr((3, -1)))
for i in range(curses.COLORS):
s.addstr('%s ' % i, to_curses_attr((i, -1)))
s.addstr('\n')
s.refresh()
s.getkey()
curses.endwin()
try:
s.getkey()
except KeyboardInterrupt:
pass
finally:
curses.endwin()
print()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment