Showing content from http://mail.python.org/pipermail/python-dev/attachments/20120113/e0b082f9/attachment.py below:
import sys class _GetchUnix: def __init__(self): import tty, sys def __call__(self): import tty, termios fd = sys.stdin.fileno() old_settings = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(1) finally: termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) return ch getch = _GetchUnix() sys.stdout.write("You choice:") sys.stdout.write( getch() + "\n")
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4