Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 1 | :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 | |
| 11 | The :mod:`tty` module defines functions for putting the tty into cbreak and raw |
| 12 | modes. |
| 13 | |
| 14 | Because it requires the :mod:`termios` module, it will work only on Unix. |
| 15 | |
| 16 | The :mod:`tty` module defines the following functions: |
| 17 | |
| 18 | |
Georg Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame^] | 19 | .. function:: setraw(fd, when=termios.TCSAFLUSH) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 20 | |
| 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 Brandl | 7f01a13 | 2009-09-16 15:58:14 +0000 | [diff] [blame^] | 26 | .. function:: setcbreak(fd, when=termios.TCSAFLUSH) |
Georg Brandl | 116aa62 | 2007-08-15 14:28:22 +0000 | [diff] [blame] | 27 | |
| 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 | |