You can run Python in unbuffered mode. It will transfer the output to the stream directly. The buffer will not be involved.