On this page
termios.tcsetattr
Prev: termios.tcsendbreak | Up: termios | Next: termios.tcsetwinsize
Rel: termios.error, termios.tcdrain, termios.tcflow, termios.tcflush
Ref: docs.python.org — termios.tcsetattr
Tags: #public #python3 #stdlib #termios
Import
import termios
from termios import tcsetattr
Signature & Overview
termios.tcsetattr(fd, when, attributes, /)
Set the tty attributes for file descriptor fd.
Usage
import termios
# Applies modified terminal attributes (TCSADRAIN / TCSAFLUSH / TCSANOW)
assert callable(termios.tcsetattr)
Gotchas
- Always restore saved attributes in
finally:or the user's shell will stay broken after exit.
REPL Inspect
from termios import tcsetattr
help(tcsetattr)
Linked from
Related notes
- tuts/python3/stdlib_module/termios/tcsendbreak Linked here; links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcsetwinsize Linked here; links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/termios/error Linked here; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcdrain Linked here; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcflow Linked here; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcflush Linked here; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcgetattr shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcgetwinsize shared tags: #stdlib, #termios
- tuts/c/stdlib shared tags: #stdlib