tty — Функції керування терміналом

Вихідний код: Lib/tty.py


Модуль tty визначає функції для переведення tty в режими cbreak і raw.

Оскільки для цього потрібен модуль termios, він працюватиме лише в Unix.

Модуль tty визначає такі функції:

tty.setraw(fd, when=termios.TCSAFLUSH)

Change the mode of the file descriptor fd to raw. If when is omitted, it defaults to termios.TCSAFLUSH, and is passed to termios.tcsetattr().

tty.setcbreak(fd, when=termios.TCSAFLUSH)

Change the mode of file descriptor fd to cbreak. If when is omitted, it defaults to termios.TCSAFLUSH, and is passed to termios.tcsetattr().

Дивись також

Модуль termios

Низькорівневий інтерфейс керування терміналом.