def __exit__(self, type, value, traceback): termios.tcsetattr(self.fd, termios.TCSAFLUSH, self.old_term)