On this page
  1. tty.setcbreak
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

tty.setcbreak

Prev: tty.cfmakeraw | Up: tty | Next: tty.setraw
Rel: tty.cfmakecbreak, tty.cfmakeraw, tty.setraw
Ref: docs.python.org — tty.setcbreak
Tags: #public #python3 #stdlib #tty


Import

import tty
from tty import setcbreak

Signature & Overview

tty.setcbreak(fd, when=2)

Put terminal into cbreak mode.

Usage

import tty

# Unix-only: switches a TTY fd to cbreak mode (unbuffered keypresses, Ctrl-C still works)
assert callable(tty.setcbreak)

Gotchas

REPL Inspect

from tty import setcbreak
help(setcbreak)

Linked from

Related notes