output buffering--am I missing something obvious?

Andrew Koenig ark at research.att.com
Fri Apr 4 16:33:34 EST 2003


Skip> I tried using 1.5.2 (!) on a Solaris 8 machine (it's what comes on the
Skip> Software Companion CD for Sol8) I get the same results:

>>>> import sys
>>>> sys.stdout.write("foo")
foo> sys.stdout.flush()
>>>> sys.stdout.write("bar\n")
Skip> bar

Skip> Bit rot somewhere?  It certainly shouldn't do that.

In a follow-up message, I suggested that interactive input tossed
unwritten output.  I'm now not so sure it's that simple, because if I
do this:

>>> sys.stdout.write("foooooooooooooooooo"); sys.stdout.flush()

it appears to write the argument string *and then to backspace over it*,
erasing the characters from view.

Very odd.







More information about the Python-list mailing list