Check for keypress on Linux xterm ?

Grant Edwards grante at visi.com
Tue Apr 10 00:38:37 EDT 2007


On 2007-04-09, hlubenow <hlubenow2 at gmx.net> wrote:

> My problem is, I don't want my program to wait for the keypress.
> I just want to check, if a key is currently pressed and if not, I'd like to
> continue with my program (like "INKEY$" in some BASIC-dialects).

The answer to this frequently asked question is actually in the FAQ:

 http://www.python.org/doc/faq/library.html#how-do-i-get-a-single-keypress-at-a-time

Google finds us further examples: 
 
 http://mail.python.org/pipermail/pythonmac-sig/2004-February/010140.html
 http://mail.python.org/pipermail/python-list/2000-June/041251.html

-- 
Grant Edwards                   grante             Yow!  I'm reporting for
                                  at               duty as a modern person. I
                               visi.com            want to do the Latin
                                                   Hustle now!



More information about the Python-list mailing list