python how to reversetty.setraw(sys.stdin) code example
Example: 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)