How to control I/O buffering besides -u?

Dave Angel davea at ieee.org
Sat Sep 26 12:20:29 EDT 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.

DaveA





More information about the Python-list mailing list