Last active
March 5, 2020 12:14
-
-
Save silviot/dfa76a928b9295a7d5264fecf43068d2 to your computer and use it in GitHub Desktop.
Restore sanity to degraded pdb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import sys | |
import termios | |
fd = sys.stdin.fileno() | |
(iflag, oflag, cflag, lflag, ispeed, ospeed, cc) = termios.tcgetattr(fd) | |
lflag |= termios.ECHO | |
new_attr = [iflag, oflag, cflag, lflag, ispeed, ospeed, cc] | |
termios.tcsetattr(fd, termios.TCSANOW, new_attr) | |
logging.getLogger().setLevel(logging.ERROR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment