예제 #1
0
def terminateCursesTerminal(stdscr):
    """Terminate the curses terminal."""

    unicurses.nocbreak()
    unicurses.keypad(stdscr, False)
    unicurses.curs_set(True)
    unicurses.timeout(True)
    unicurses.echo()

    unicurses.endwin()
예제 #2
0
def initializeCursesTerminal():
    """Initialize the curses terminal and return the window object."""

    stdscr = unicurses.initscr()
    
    unicurses.start_color()
    unicurses.noecho()
    unicurses.cbreak()
    unicurses.keypad(stdscr, True)
    unicurses.timeout(False)
    unicurses.curs_set(False)

    return stdscr