On Tue, 25 Jan 2005 12:38:13 -0700, Brent W. Hughes
<[EMAIL PROTECTED]> wrote:
> I'd like to get a character from stdin, perform some action, get another
> character, etc.  If I just use stdin.read(1), it waits until I finish typing
> a whole line before I can get the first character.  How do I deal with this?

This is exactly what you need:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892
Title: "getch()-like unbuffered character reading from stdin on both
Windows and Unix"

This recipe was a lifesaver for me once :-)

Regards,
-- 
Swaroop C H
Blog: http://www.swaroopch.info
Book: http://www.byteofpython.info
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to