/Doc/library/tty.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 38 lines · 22 code · 16 blank · 0 comment · 0 complexity · ad1b12de51efa082e40642b5981a6602 MD5 · raw file

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