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 :-)
Thanks for the link! I've seen this question before a few times, but no one had pointed out the recipe.
Steve -- http://mail.python.org/mailman/listinfo/python-list