How can I handle the char immediately after its input, without waiting an endline?
mailmaverick666 at gmail.com
Wed Oct 22 11:16:33 CEST 2008
The below piece of code should give you some understanding
print "Press x to exit"
while char != 'x' :
char = sys.stdin.read(1)
print "You entered : ",char
# Your code here
On Wed, Oct 22, 2008 at 2:34 PM, Lave <lave.wang.w at gmail.com> wrote:
> Hi, all.
> I'm a new comer. So This question maybe sutpid.:)
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list