On this page
36.8. tty —终端控制Function
tty模块定义用于将 tty 置于 cbreak 和 raw 模式的函数。
因为它需要termios模块,所以它只能在 Unix 上工作。
tty模块定义以下Function:
tty.
setraw
(* fd * [,* when *])- 将文件 Descriptors* fd 的模式更改为 raw。如果Ellipsis when *,则默认为
termios.TCSAFLUSH
,并传递给termios.tcsetattr()。
- 将文件 Descriptors* fd 的模式更改为 raw。如果Ellipsis when *,则默认为
tty.
setcbreak
(* fd * [,* when *])- 将文件 Descriptors* fd 的模式更改为 cbreak。如果Ellipsis when *,则默认为
termios.TCSAFLUSH
,并传递给termios.tcsetattr()。
- 将文件 Descriptors* fd 的模式更改为 cbreak。如果Ellipsis when *,则默认为
See also
Module termios
低级终端控制界面。