How can I handle the char immediately after its input, without waiting an endline?

Lie Ryan lie.1296 at gmail.com
Sat Oct 25 04:36:32 EDT 2008


>>> I want to write something that handle every char immediately after its
>>> input. Then tehe user don't need to type [RETURN] each time. How can I
>>> do this?
>>>
>>> Thanks in advance.

Don't you think that getting a one-character from console is something 
that many people do very often? Do you think that all these platform 
independent code should be moved to the interpreter level instead (and 
raises the appropriate error when the platform somehow cannot do 
unbuffered input)? So python developer could do something like this:

raw_input(bufferring = 0)




More information about the Python-list mailing list