def __exit__(self, exc_type, exc_val, exc_tb): # for thread in self.threads: # thread.join() curses.noraw() self.screen.keypad(False) curses.echo() curses.endwin()