(self)
| 27 | __import__("tty") |
| 28 | |
| 29 | def __call__(self): |
| 30 | import sys |
| 31 | import termios |
| 32 | import tty |
| 33 | |
| 34 | fd = sys.stdin.fileno() |
| 35 | old_settings = termios.tcgetattr(fd) |
| 36 | try: |
| 37 | tty.setraw(sys.stdin.fileno()) |
| 38 | ch = sys.stdin.read(1) |
| 39 | finally: |
| 40 | termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) |
| 41 | return ch |
| 42 | |
| 43 | class _GetchWindows(object): |
| 44 | def __init__(self): |