def input_flush():
"""Flush the input buffer on posix and windows."""
try:
import sys, termios # noqa
termios.tcflush(sys.stdin, termios.TCIFLUSH)
except ImportError:
import msvcrt
while msvcrt.kbhit():
msvcrt.getch()
评论列表
文章目录