[Tutor] buffering IO
John P Speno
speno at isc.upenn.edu
Sun Aug 24 23:54:51 EDT 2003
On Mon, Aug 25, 2003 at 04:44:16AM +0400, Denis Dzyubenko wrote:
> Hello,
>
> I need to disable buffering for some file descriptors. For regular files
> I can use third argument of open(fname, mode, bufsize), but what to do
> with stdin and stdout? In C I can use setvbuf function to disable
> buffering, but I can't find python-version of this function.
See the -u option for python, which says:
-u Force stdin, stdout and stderr to be totally
unbuffered.
More information about the Tutor
mailing list