On Tuesday 07 October 2008 05:33:18 pm George Sakkis wrote: > Not an answer to your actual question, but you can keep the 'for' loop > instead of rewriting it with 'while' using the iter(function, > sentinel) idiom: > > for line in iter(sys.stdin.readline, ""): > print "You said!", line
You're right, it's not an answer to my actual question, but I had completely forgotten about the 'sentinel' idiom. Many thanks... I was trying to do it with 'itertools', obviously with no luck. The question still stands (how to turn off the buffering), but this is a nice workaround until it gets answered. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list