def main(stdscr): screen = Screen(stdscr) while not screen.terminated: key = stdscr.getch() screen.input_key(key)