Code explanation please
Tim Hammerquist
tim at vegeta.ath.cx
Thu Jan 3 22:01:52 EST 2002
Craig E. Smith <craigesmith at hotmail.com> graced us by uttering:
> The piece of code below is taken from the Myp3 project. Can someone
> explain to me the need/reason for the flush() call after each write()
> to pin?
Pipes, sockets, and physical files on the filesystem have a buffering
behavior for performance reasons. For example, they flush automatically
only at, say, EOL, EOF, or after a certain number of bytes. The flush
call flushes the buffer explicitly.
HTH
Tim Hammerquist
--
E Pluribus Unix
More information about the Python-list
mailing list