Skip to content

Instantly share code, notes, and snippets.

@szolotykh
Created October 16, 2014 23:07
Show Gist options
  • Save szolotykh/b0ba8138f5aed54cf7f2 to your computer and use it in GitHub Desktop.
Save szolotykh/b0ba8138f5aed54cf7f2 to your computer and use it in GitHub Desktop.
Python: onpress
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