blob: d13c6f92d306ababcbbf369a8e211474133b9a65 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001:mod:`tty` --- Terminal control functions
2=========================================
3
4.. module:: tty
5 :platform: Unix
6 :synopsis: Utility functions that perform common terminal control operations.
7.. moduleauthor:: Steen Lumholt
8.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
9
10
11The :mod:`tty` module defines functions for putting the tty into cbreak and raw
12modes.
13
14Because it requires the :mod:`termios` module, it will work only on Unix.
15
16The :mod:`tty` module defines the following functions:
17
18
Georg Brandl7f01a132009-09-16 15:58:14 +000019.. function:: setraw(fd, when=termios.TCSAFLUSH)
Georg Brandl116aa622007-08-15 14:28:22 +000020
21 Change the mode of the file descriptor *fd* to raw. If *when* is omitted, it
22 defaults to :const:`termios.TCSAFLUSH`, and is passed to
23 :func:`termios.tcsetattr`.
24
25
Georg Brandl7f01a132009-09-16 15:58:14 +000026.. function:: setcbreak(fd, when=termios.TCSAFLUSH)
Georg Brandl116aa622007-08-15 14:28:22 +000027
28 Change the mode of file descriptor *fd* to cbreak. If *when* is omitted, it
29 defaults to :const:`termios.TCSAFLUSH`, and is passed to
30 :func:`termios.tcsetattr`.
31
32
33.. seealso::
34
35 Module :mod:`termios`
36 Low-level terminal control interface.
37