skip to navigation
skip to content

Not Logged In

getch 1.0

Does single char input, like C getch/getche

Package Documentation

The getch module does single-char input by providing wrappers for the conio.h library functions getch() (gets a character from user input, no output - this is useful for password input) and getche() (also outputs to the screen), if conio.h does not exist, it uses a stub-library using termios.h and other headers to emulate this behaviour:

import getch
# ...
char = getch.getch() # User input, but not displayed on the screen
# or
char = getch.getche() # also displayed on the screen

Hint: On Windows, you can use:

import msvcrt
# ...
char = msvcrt.getch()
# or, to display it on the screen
char = msvcrt.getche()

as a standard library alternative to this module

 
File Type Py Version Uploaded on Size
getch-1.0-python2.tar.gz (md5)
For Python 2.x
Source 2013-05-03 1KB
getch-1.0.tar.gz (md5)
Version 3 upwards (due to changes in the C extension interface)
Source 2013-05-03 1KB
  • Downloads (All Versions):
  • 13 downloads in the last day
  • 81 downloads in the last week
  • 430 downloads in the last month