tty — Terminal control functions¶
Source code:Lib/tty.py
Thetty module defines functions for putting the tty into cbreak and rawmodes.
Because it requires thetermios module, it will work only on Unix.
Thetty module defines the following functions:
tty.setraw(fd,when=termios.TCSAFLUSH)¶Change the mode of the file descriptorfd to raw. Ifwhen is omitted, itdefaults to
termios.TCSAFLUSH, and is passed totermios.tcsetattr().
tty.setcbreak(fd,when=termios.TCSAFLUSH)¶Change the mode of file descriptorfd to cbreak. Ifwhen is omitted, itdefaults to
termios.TCSAFLUSH, and is passed totermios.tcsetattr().
See also
- Module
termios Low-level terminal control interface.