Example #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)
Example #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)
Example #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)
Example #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)