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

tty.setraw

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


Import

import tty
from tty import setraw

Signature & Overview

tty.setraw(fd, when=2)

Put terminal into raw mode.

Usage

import tty

# Unix-only: switches a TTY fd to raw mode (even Ctrl-C arrives as byte 0x03)
assert callable(tty.setraw)

Gotchas

REPL Inspect

from tty import setraw
help(setraw)

Linked from

Related notes