smugji
0
Q:

python how to reversetty.setraw(sys.stdin)

fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
    tty.setraw(fd)
    data = "stuff" # whatever it is you need doing
    return data
finally:
    termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
0

New to Communities?

Join the community