Buffering control in python?

Fernando Pérez fperez528 at yahoo.com
Sun Oct 13 04:43:56 CEST 2002


James J. Besemer wrote:

> The optional 3rd argument to the open() function( file() in 2.2)
> controls buffering.  The doc says it controls the buffer size (which it
> does) but the fine print also says a value of 1 results in "line"
> buffering and a value of 0 results in unbuffered.

Ah, zero was the magic value. The code posted earlier by Michal Wallace then 
works just fine, it's just that I needed to call it with 0 instead of -1. 
Thanks a bunch!

f.



More information about the Python-list mailing list