raw_input in loop
mwh21 at cam.ac.uk
Thu May 4 22:35:28 CEST 2000
robin.escalation at ACM.org writes:
> "Robert Cragie" <rcc at nospamthanks_jennic.com> wrote:
> >There is also the msvcrt module - function kbhit() might be what you're
> That's fine for WinXX, but how about other platforms? I hate to lock
> myself into GatesLand solutions.
On unix you can have lots of fun with termios; something like this?
oldattr = termios.tcgetattr(0)
attr = termios.tcgetattr(0)
attr = attr & ~(TERMIOS.ICANON|TERMIOS.ECHO)
r,_,_ = select.select(,,,0)
This sort of thing's inherently unportable though.
58. Fools ignore complexity. Pragmatists suffer it. Some can avoid
it. Geniuses remove it.
-- Alan Perlis, http://www.cs.yale.edu/~perlis-alan/quotes.html
More information about the Python-list