On this page
termios.tcsetwinsize
Prev: termios.tcsetattr | Up: termios
Rel: termios.error, termios.tcdrain, termios.tcflow, termios.tcflush
Ref: docs.python.org — termios.tcsetwinsize
Tags: #public #python3 #stdlib #termios
Import
import termios
from termios import tcsetwinsize
Signature & Overview
termios.tcsetwinsize(fd, winsize, /)
Set the tty winsize for file descriptor fd.
Usage
import termios
# Python 3.11+ Unix-only: sets (rows, cols) on a PTY/TTY fd
assert hasattr(termios, 'tcsetwinsize') or True
Gotchas
- Useful when resizing a
pty.openpty()slave to match the host terminal.
REPL Inspect
from termios import tcsetwinsize
help(tcsetwinsize)
Linked from
Related notes
- tuts/python3/stdlib_module/termios/tcsetattr 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/python3/stdlib_module/termios/tcsendbreak shared tags: #stdlib, #termios
- tuts/c/stdlib shared tags: #stdlib