On this page
curses.flushinp
Prev: curses.flash | Up: curses | Next: curses.get_escdelay
Rel: curses.assume_default_colors, curses.baudrate, curses.beep, curses.can_change_color
Ref: docs.python.org — curses.flushinp
Tags: #public #python3 #stdlib #curses
Import
import curses
from curses import flushinp
Signature & Overview
curses.flushinp()
Flush all input buffers.
Usage
import curses
# Discards any buffered unread keystrokes from the input queue
assert callable(curses.flushinp)
Gotchas
- Handy before confirmation prompts so stray keypresses during a slow operation don't auto-confirm.
REPL Inspect
from curses import flushinp
help(flushinp)
Linked from
Related notes
- tuts/python3/stdlib_module/curses/flash Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/get_escdelay Linked here; links to this page; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/curses/assume_default_colors Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/baudrate Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/beep Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/can_change_color Linked here; shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/cbreak shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/color_content shared tags: #curses, #stdlib
- tuts/python3/stdlib_module/curses/color_pair shared tags: #curses, #stdlib