Debian Codegraph @

cpython27/Doc/library/tty.rst

raw
1
2 :mod:`tty` --- Terminal control functions
3 =========================================
4
5 .. module:: tty
6 :platform: Unix
7 :synopsis: Utility functions that perform common terminal control operations.
8 .. moduleauthor:: Steen Lumholt
9 .. sectionauthor:: Moshe Zadka <[email protected]>
10
11
12 The :mod:`tty` module defines functions for putting the tty into cbreak and raw
13 modes.
14
15 Because it requires the :mod:`termios` module, it will work only on Unix.
16
17 The :mod:`tty` module defines the following functions:
18
19
20 .. function:: setraw(fd[, when])
21
22 Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it
23 defaults to :const:`termios.TCSAFLUSH`, and is passed to
24 :func:`termios.tcsetattr`.
25
26
27 .. function:: setcbreak(fd[, when])
28
29 Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it
30 defaults to :const:`termios.TCSAFLUSH`, and is passed to
31 :func:`termios.tcsetattr`.
32
33
34 .. seealso::
35
36 Module :mod:`termios`
37 Low-level terminal control interface.
38