keypressed...

Dan Bishop danb_83 at yahoo.com
Mon Feb 10 02:06:49 EST 2003


gabor <gabor at z10n.net> wrote in message news:<mailman.1044839433.2950.python-list at python.org>...
> hi,
> 
> i need something like this:
> -------------------------------------------
> while True:
> 	if keypressed():
> 		key = getPressedKey()
> 		dosomething(key)
> --------------------------------------------
> 
> are there any functions for that ( keypressed, getpressedkey )?

# Code for getch can be found at
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892

while True:
   dosomething(getch())




More information about the Python-list mailing list