[Python-checkins] python/dist/src/Misc python.man,1.24,1.25
Jack Jansen
Jack.Jansen@oratrix.com
Sun, 28 Jul 2002 23:24:54 +0200
On zondag, juli 28, 2002, at 12:34 , loewis@users.sourceforge.net wrote:
> Update of /cvsroot/python/python/dist/src/Misc
> In directory usw-pr-cvs1:/tmp/cvs-serv22720/Misc
>
> Modified Files:
> python.man
> Log Message:
> Patch #552812: Better description in "python -h" for -u.
>
[...]
> ! 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?
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution --
Emma Goldman -