summaryrefslogtreecommitdiffstats
path: root/Lib/tty.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-04 15:28:42 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-04 15:28:42 (GMT)
commite7b146fb3bdca62a0d5ecc06dbf3348e5a4fe757 (patch)
treee1dda862f680cf4a1169220af2ecbca3322caf4d /Lib/tty.py
parent54f22ed30bab2e64909ba2d79205cb4b87c69db2 (diff)
downloadcpython-e7b146fb3bdca62a0d5ecc06dbf3348e5a4fe757.zip
cpython-e7b146fb3bdca62a0d5ecc06dbf3348e5a4fe757.tar.gz
cpython-e7b146fb3bdca62a0d5ecc06dbf3348e5a4fe757.tar.bz2
The third and final doc-string sweep by Ka-Ping Yee.
The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
Diffstat (limited to 'Lib/tty.py')
-rw-r--r--Lib/tty.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/tty.py b/Lib/tty.py
index 86530cf..20a31c0 100644
--- a/Lib/tty.py
+++ b/Lib/tty.py
@@ -1,4 +1,5 @@
-# tty.py -- Terminal utilities.
+"""Terminal utilities."""
+
# Author: Steen Lumholt.
from TERMIOS import *
@@ -13,8 +14,8 @@ ISPEED = 4
OSPEED = 5
CC = 6
-# Put terminal into a raw mode.
def setraw(fd, when=TCSAFLUSH):
+ """Put terminal into a raw mode."""
mode = tcgetattr(fd)
mode[IFLAG] = mode[IFLAG] & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON)
mode[OFLAG] = mode[OFLAG] & ~(OPOST)
@@ -25,8 +26,8 @@ def setraw(fd, when=TCSAFLUSH):
mode[CC][VTIME] = 0
tcsetattr(fd, when, mode)
-# Put terminal into a cbreak mode.
def setcbreak(fd, when=TCSAFLUSH):
+ """Put terminal into a cbreak mode."""
mode = tcgetattr(fd)
mode[LFLAG] = mode[LFLAG] & ~(ECHO | ICANON)
mode[CC][VMIN] = 1