Initial tests with curses

This commit is contained in:
John Ladan 2012-03-09 16:28:38 -05:00
commit 837c7ed9d8
1 changed files with 20 additions and 0 deletions

20
cursestest.py Executable file
View File

@ -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)