Coding style.

- Better comment.
This commit is contained in:
Andrew Hamilton 2022-01-05 07:43:25 +10:00
parent 3e145fc5e4
commit 3a826c1bc0

View file

@ -71,7 +71,7 @@ def raw():
old_termios_settings = termios.tcgetattr(sys.stdin)
new_settings = termios.tcgetattr(sys.stdin)
new_settings[0] = new_settings[0] & ~termios.IXON # ctrl-s doesn't freeze output
# Don't print keys typed. Read byte by byte. Ctrl-c and ctrl-z aren't special.
# Don't print keys. Read byte by byte. Ctrl-c and ctrl-z aren't special.
new_settings[3] = new_settings[3] & ~termios.ECHO & ~termios.ICANON & ~termios.ISIG
new_settings[6][termios.VMIN] = 0 # Read unblocks immediately on input
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, new_settings)