On Nov 8, 2007 12:34 PM, Luke Stebbing <[EMAIL PROTECTED]> wrote:
> On 11/8/07, Wojciech Walczak <[EMAIL PROTECTED]> wrote:
> > Got it! Please, take a look at my patch. It's in the attachment. I am
> > still digging in the source, but I think that I have found the core of
> > the bug.
> > Without that patch "ret=sys.stdout.write('x')" acts in the same way as
> > print('x',end=''), which is - it prints nothing. After applying the
> > patch it is allright for both sys.stdout.write() and for print().
>
> If the buffer size is 1, isn't that arguably the correct behavior,
> i.e. don't flush until you have _more_ data than you can store?Well, passing '1' as the buffer size to open() is supposed to set the buffer size to the default value (typically 8K) *and* set a special flag that forces a flush() whenever a line end is written. But this isn't implemented; instead, it just flushes after each character... (Which has the desired effect of not buffering interactive output, but does it very inefficiently.) -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
