예제 #1
0
    def _init(self):
        """Initialise the curses library."""
        self._stdscr = curses.initscr()
        self._stdscr.keypad(1)
        self._stdscr.nodelay(1)
        self._stdscr.clear()
        curses.cbreak()
        curses.noecho()

        event.event(sys.stdin).connect(self._userinput)
예제 #2
0
    def _init(self):
        """Initialise the curses library."""
        self._stdscr = curses.initscr()
        self._stdscr.keypad(1)
        self._stdscr.nodelay(1)
        self._stdscr.clear()
        curses.cbreak()
        curses.noecho()

        event.event(sys.stdin).connect(self._userinput)
예제 #3
0
    def _deinit(self):
        """Shutdown the curses library."""
        self._stdscr.move(self._stdscr.getmaxyx()[0] - 1, 0)
        self._stdscr.clrtoeol()
        self._stdscr.refresh()

        self._stdscr.keypad(0)
        curses.nocbreak()
        curses.echo()
        curses.endwin()

        event.event(sys.stdin, clear=True)
예제 #4
0
    def _deinit(self):
        """Shutdown the curses library."""
        self._stdscr.move(self._stdscr.getmaxyx()[0] - 1, 0)
        self._stdscr.clrtoeol()
        self._stdscr.refresh()

        self._stdscr.keypad(0)
        curses.nocbreak()
        curses.echo()
        curses.endwin()

        event.event(sys.stdin, clear=True)