Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: kbhit/getch python equivalent Date: Mon, 22 Apr 2013 14:10:02 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1366639802 27426 64.122.56.22 (22 Apr 2013 14:10:02 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Mon, 22 Apr 2013 14:10:02 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:44073 On 2013-04-22, alb wrote: > I'm looking for a kbhit/getch equivalent in python in order to be able > to stop my inner loop in a controlled way (communication with external > hardware is involved and breaking it abruptly may cause unwanted errors > on the protocol). > > I'm programming on *nix systems, no need to be portable on Windows. I've > seen the msvcrt module, but it looks like is for Windows only. > > Any ideas/suggestions? Signals, ncurses, termios. -- Grant Edwards grant.b.edwards Yow! ANN JILLIAN'S HAIR at makes LONI ANDERSON'S gmail.com HAIR look like RICARDO MONTALBAN'S HAIR!