[Python-Dev] Re: [Python-checkins] python/dist/src/Misc python.man,1.24,1.25

Martin v. L÷wis loewis@informatik.hu-berlin.de
Thu, 1 Aug 2002 10:27:10 +0200 (CEST)

Jack Jansen <Jack.Jansen@oratrix.com> writes:

> > ! Force stdin, stdout and stderr to be totally unbuffered.  Note that
> > ! there is internal buffering in xreadlines(), readlines() and file-object
> > ! iterators ("for line in sys.stdin") which is not influenced by this
> > ! option.  To work around this, you will want to use "sys.stdin.readline()"
> > ! inside a "while 1:" loop.
> For readlines() I think this is the right thing to do, but
> xreadlines() and file iterators could actually "do the right thing"
> and revert to a slower scheme if the underlying stream is unbuffered?
> Or is this overkill?

I'm not sure. The patch describes the current state; if anybody
improves that, they should change the man page, too.