added a test curses

This commit is contained in:
John Ladan 2012-03-09 16:41:00 -05:00
parent 837c7ed9d8
commit b74ce8f874
1 changed files with 12 additions and 1 deletions

View File

@ -17,4 +17,15 @@ def showBold(stdscr):
stdscr.refresh()
stdscr.getch()
curses.wrapper(showBold)
def simplePrintw(stdscr):
mesg = "Just a string"
(row,col) = stdscr.getmaxyx()
stdscr.addstr(row/2, (col-len(mesg))/2, mesg)
stdscr.addstr(row-2, 0, "This screen has " +str(row)+ " rows and " +str(col)+ " columns\n")
stdscr.addstr("Try resizing window and running it again")
stdscr.refresh()
stdscr.getch()
curses.wrapper(simplePrintw)