Where is the buffer in this following ... and how do I turn it off?
I am writing out to stdout in a python program like so:
for line in sys.stdin:
file.readlines() and for line in file have internal buffering which is not affected by -u option (see -u option note). Use
while True:
l=sys.stdin.readline()
sys.stdout.write(l)
instead.
By the way, sys.stdout is line-buffered by default if it points to terminal and sys.stderr is unbuffered (see stdio buffering).