Answers for "python how to reversetty.setraw(sys.stdin)"

0

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)
Posted by: Guest on June-21-2020

Code answers related to "python how to reversetty.setraw(sys.stdin)"

Python Answers by Framework

Browse Popular Code Answers by Language