def setup_tty(self): if os.isatty(sys.stdin.fileno()): LOG.debug('putting tty into raw mode') self.old_settings = termios.tcgetattr(sys.stdin) tty.setraw(sys.stdin)