tty --- Terminal control functions¶
ソースコード: Lib/tty.py
tty モジュールは端末を cbreak および raw モードにするための関数を定義しています。
Availability: Unix.
このモジュールは 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 totermios.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 totermios.tcsetattr().
参考
- モジュール
termios 低水準端末制御インターフェース。