output buffering--am I missing something obvious?

Andrew Koenig ark at research.att.com
Fri Apr 4 16:10:32 EST 2003


ark Can someone please explain the following behavior?  Under Python 2.2.2
ark and Solaris 2.8:

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

Never mind -- I figured it out.  Apparently the interactive loop
discards all pending output before reading the next input statement.

-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list