Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: Monitor key presses in Python? Date: Mon, 9 Sep 2013 18:40:35 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 18 Message-ID: References: <57051d11-abd9-4621-9618-1574cd37545c@googlegroups.com> NNTP-Posting-Host: panix3.panix.com X-Trace: reader1.panix.com 1378752035 29522 166.84.1.3 (9 Sep 2013 18:40:35 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 9 Sep 2013 18:40:35 +0000 (UTC) User-Agent: nn/6.7.3 Xref: csiph.com comp.lang.python:53884 In <57051d11-abd9-4621-9618-1574cd37545c@googlegroups.com> eamonnrea@gmail.com writes: > Is there a way to detect if the user presses a key in Python that works on > most OS's? That depends on what you're really asking; your question is somewhat vague. Are you asking for a function that waits for the user to press a key and then returns the key that was pressed? Or are you asking for a function that detects whether a key has been pressed at all? -- John Gordon A is for Amy, who fell down the stairs gordon@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"