Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
4+5 =