import curses stdscr = curses.initscr() stdscr.clear() curses.noecho() curses.cbreak() stdscr.keypad(True) stdscr.getkey() curses.nocbreak() stdscr.keypad(False) curses.echo() curses.endwin()