On this page
termios.tcflush
Prev: termios.tcflow | Up: termios | Next: termios.tcgetattr
Rel: termios.error, termios.tcdrain, termios.tcflow, termios.tcgetattr
Ref: docs.python.org — termios.tcflush
Tags: #public #python3 #stdlib #termios
Import
import termios
from termios import tcflush
Signature & Overview
termios.tcflush(fd, queue, /)
Discard queued data on file descriptor fd.
Usage
import termios
# Unix-only: discards unread input (TCIFLUSH) or unwritten output (TCOFLUSH)
assert callable(termios.tcflush)
Gotchas
- Useful before prompts to flush stray buffered keystrokes.
REPL Inspect
from termios import tcflush
help(tcflush)
Linked from
- tuts/python3/stdlib_module/termios
- tuts/python3/stdlib_module/termios/error
- tuts/python3/stdlib_module/termios/tcdrain
- tuts/python3/stdlib_module/termios/tcflow
- tuts/python3/stdlib_module/termios/tcgetattr
- tuts/python3/stdlib_module/termios/tcgetwinsize
- tuts/python3/stdlib_module/termios/tcsendbreak
- tuts/python3/stdlib_module/termios/tcsetattr
- tuts/python3/stdlib_module/termios/tcsetwinsize
Related notes
- tuts/python3/stdlib_module/termios/error Linked here; links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcdrain Linked here; links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcflow Linked here; links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcgetattr 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/tcgetwinsize links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcsendbreak links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcsetattr links to this page; shared tags: #stdlib, #termios
- tuts/python3/stdlib_module/termios/tcsetwinsize links to this page; shared tags: #stdlib, #termios
- tuts/c/stdlib shared tags: #stdlib