output buffering--am I missing something obvious?
Michael Hudson
mwh at python.net
Sun Apr 6 13:05:45 EDT 2003
Andrew Koenig <ark at research.att.com> writes:
> 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.
Now questions like the value of $TERM enter the picture... and
readline, like Paul said.
Do other programs exhibit similar behaviour? Not sure what I'd try,
mind...
Cheers,
M.
--
how am I expected to quit smoking if I have to deal with NT
every day -- Ben Raia
More information about the Python-list
mailing list