raw_input in loop

Robert Cragie rcc at nospamthanks_jennic.com
Wed May 3 11:38:32 EDT 2000


There is also the msvcrt module - function kbhit() might be what you're
after...

http://www.python.org/doc/current/lib/msvcrt-console.html

Robert

Alan Gauld <alan.gauld at gssec.bt.co.uk> wrote in message
news:39103BAB.D2DB2EDB at gssec.bt.co.uk...
| "A[r]TA" wrote:
| > Heyz, I want to write a loop
| > in which there's something like raw_input but which
| > doesn't stop the loop until the enterbutton is hitten.
|
| Not too clear what you mean but I suspect you want
| something like INKEY$ in BASIC?
|
| ie it continues as soon as any key is hit?
|
| > How do I do that???
|
| Assuming my assumption is right you could try using curses.
| There is a function called wgetch() which works like INKEY$
| Its not available for Windows tho' (although you might find
| it on the web somewhere.)
|
| Alan G.
| --
| =================================================
| This post represents the views of the author
| and does not necessarily accurately represent
| the views of BT.





More information about the Python-list mailing list