编辑器
import tty import sys try: tty.setcbreak(sys.stdin.fileno()) print('Terminal set to cbreak mode') except (OSError, AttributeError): print('Could not set cbreak mode (not a terminal)')
Terminal set to cbreak mode