commit 837c7ed9d88f8578bb70e16e58be786165701312 Author: John Ladan Date: Fri Mar 9 16:28:38 2012 -0500 Initial tests with curses diff --git a/cursestest.py b/cursestest.py new file mode 100755 index 0000000..6ba6eb2 --- /dev/null +++ b/cursestest.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import curses + + +def showBold(stdscr): + stdscr.addstr("Type any character to see it in bold\n") + ch = stdscr.getch() + + if (ch==curses.KEY_F1): + stdscr.addstr("F1 Key pressed") + + else: + stdscr.addstr("The key pressed is ") + stdscr.addch(ch, curses.A_BOLD) + + stdscr.refresh() + stdscr.getch() + +curses.wrapper(showBold)