# get the character of a key pressed (no return key needed) # works only in the command window and with Windows OS from msvcrt import getch print "press a char key (escape key to exit)" while True: …