Quote:
Originally Posted by
Mastaer
thank you jim mcnamar,
but the problem is not the python script. it is ok to hard kill the python script.
It doesn't hurt the script or your system to hard-kill it, no -- but it certainly doesn't do what
you want.
Python does single writes every 4096 bytes because this more efficient than doing 50 tinier writes. Python streams do this on the assumption the stream will end naturally, not get hard-killed while waiting for the 4096th byte. This is not a shell thing, a redirection thing, or any kind of system buffer -- the buffer is in Python, part of Python's code, controlled by Python, and must be configured in Python to disable Python's write buffer.
This is not the same as system disk cache, that's transparent, you'd see a correct result if the system knew it was supposed to be there.
This is not the same as the buffers used for pipes. Those don't apply when not using pipes.
You cannot force Python or any other program to not buffer from the outside, unless there's some mysterious NEVER_BUFFER environment variable Python responds to or something.