[EMAIL PROTECTED] wrote:
If I do:

$ ./produce.py | ./read.py

I get nothing for ten seconds, then I get the numbers 0 through 9, one per line.

What am I missing?


From the python man page:
-u
Force stdin, stdout and stderr to be totally unbuffered. On systems where it matters, also put stdin, stdout and stderr in binary mode. Note that there is internal buffering in xreadlines(), readlines() and file-object iterators ("for line in sys.stdin") which is not influenced by this option. To work around this, you will want to use "sys.stdin.readline()" inside a "while 1:" loop.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to