A completely silly question
mwm at mired.org
Fri Dec 17 21:52:17 CET 2004
Steven Bethard <steven.bethard at gmail.com> writes:
> Mike Meyer wrote:
>> That doesn't do what he wants, because it doesn't return until you hit
>> a newline.
> Of course if the intent is to have this work with terminal input, then
> yes, sys.stdin.read(1) is probably not going to do the right thing...
That's what the OP asked for - a way to wait for a single character,
like while(getchar()) in C.
Hmm. That tells me he's probably on a Windows box, so my unix solution
wouldn't do him much good.
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list