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:
The problem is in your for loop. It will wait for EOF before continuing on. You can fix it with a code like this.
while True: try: line = sys.stdin.readline() except KeyboardInterrupt: break if not line: break print line,
Try this out.