Check for keystroke

Brian ThisIsNotMyReal at
Wed Sep 22 16:37:56 CEST 2004

Inside a loop, I need to passively check to see if a key is pressed or not 
without pausing like raw_input does.  Some pseudocode:

While true:
    	If a key is pressed
    	    	which key is pressed
    	do other stuff inside loop

Google groups turned up this thread:


But neither the pygame or curses solution worked.  Any new thoughts on 

More information about the Python-list mailing list