How to control I/O buffering besides -u?

Dave Angel davea at
Sat Sep 26 18:20:29 CEST 2009

kj wrote:
> Is there any way to specify unbuffered I/O from *within* the code
> (rather than via the command-line -u flag)?
> TIA!
> kynn
When creating a file object, specify a buffer size of zero.  I don't 
know how to change the buffering of a file object that's already been 
created, as stdin, stdout, and stderr are.


More information about the Python-list mailing list