Buffering control in python?

Erik Max Francis max at alcyone.com
Sun Oct 13 07:19:08 CEST 2002


Fernando Pérez wrote:

> 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!

Note for the record the behavior is documented here:

http://www.python.org/doc/current/lib/built-in-funcs.html#built-in-funcs

The third argument, can be -1, 0, 1, or some positive integer greater
than one; these mean the system default, unbuffered, line-buffered, or
(approximately) the desired buffer size.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ A good indignation brings out all one's powers.
\__/ Ralph Waldo Emerson
    Church / http://www.alcyone.com/pyos/church/
 A lambda calculus explorer in Python.



More information about the Python-list mailing list