This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If Windows getch() available, use that. If not, use a | |
# Unix version. | |
try: | |
import msvcrt | |
getch = msvcrt.getch | |
except: | |
import sys, tty, termios | |
def _unix_getch(): | |
"""Get a single character from stdin, Unix version""" |