question: reading character for character from stdin

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Fri Aug 22 11:18:24 EDT 2003


On Fri, 22 Aug 2003 15:01:41 GMT, rumours say that KwikRick
<kwkikrick at freemail.nl> might have written:

>Is there a simple way to read from stdin without having to wait for an 
>enter keypress, i.e. like  getch() in the curses module.
>I'd rather not use curses because it isn't supported on all platforms.

I presume you want that for single key-press user interactivity in
console applications?
If yes, there is no cross-platform way AFAIK.  Write a module with your
own API, and in your module find the platform under which your program
is being run and translate to the actual available library calls...
-- 
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.




More information about the Python-list mailing list