Created
October 16, 2014 23:07
-
-
Save szolotykh/b0ba8138f5aed54cf7f2 to your computer and use it in GitHub Desktop.
Python: onpress
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
import getch | |
while True: | |
# ... | |
char = getch.getch() # User input, but not displayed on the screen | |
# or | |
#char = getch.getche() # also displayed on the screen | |
print char |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment