diff options
Diffstat (limited to 'Doc/library/tty.rst')
-rw-r--r-- | Doc/library/tty.rst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Doc/library/tty.rst b/Doc/library/tty.rst new file mode 100644 index 0000000..688faee --- /dev/null +++ b/Doc/library/tty.rst @@ -0,0 +1,38 @@ + +:mod:`tty` --- Terminal control functions +========================================= + +.. module:: tty + :platform: Unix + :synopsis: Utility functions that perform common terminal control operations. +.. moduleauthor:: Steen Lumholt +.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il> + + +The :mod:`tty` module defines functions for putting the tty into cbreak and raw +modes. + +Because it requires the :mod:`termios` module, it will work only on Unix. + +The :mod:`tty` module defines the following functions: + + +.. function:: setraw(fd[, when]) + + Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it + defaults to :const:`termios.TCSAFLUSH`, and is passed to + :func:`termios.tcsetattr`. + + +.. function:: setcbreak(fd[, when]) + + Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it + defaults to :const:`termios.TCSAFLUSH`, and is passed to + :func:`termios.tcsetattr`. + + +.. seealso:: + + Module :mod:`termios` + Low-level terminal control interface. + |