MCPcopy Index your code
hub / github.com/python/cpython / cfmakecbreak

Function cfmakecbreak

Lib/tty.py:46–57  ·  view source on GitHub ↗

Make termios mode cbreak.

(mode)

Source from the content-addressed store, hash-verified

44 mode[CC][VTIME] = 0
45
46def cfmakecbreak(mode):
47 """Make termios mode cbreak."""
48 # Do not echo characters; disable canonical input.
49 mode[LFLAG] &= ~(ECHO | ICANON)
50
51 # POSIX.1-2017, 11.1.7 Non-Canonical Mode Input Processing,
52 # Case B: MIN>0, TIME=0
53 # A pending read shall block until MIN (here 1) bytes are received,
54 # or a signal is received.
55 mode[CC] = list(mode[CC])
56 mode[CC][VMIN] = 1
57 mode[CC][VTIME] = 0
58
59def setraw(fd, when=TCSAFLUSH):
60 """Put terminal into raw mode."""

Callers 1

setcbreakFunction · 0.85

Calls 1

listClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…