From 379299cecc7d6a7aaa5601ff42d9083329e33ab6 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 2 Apr 2010 08:47:07 +0000 Subject: #8213: document behavior of -u on py3k better. --- Doc/using/cmdline.rst | 5 +++-- Misc/python.man | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst index 540e4d7..0978770 100644 --- a/Doc/using/cmdline.rst +++ b/Doc/using/cmdline.rst @@ -232,8 +232,9 @@ Miscellaneous options .. cmdoption:: -u - Force stdin, stdout and stderr to be totally unbuffered. On systems where it - matters, also put stdin, stdout and stderr in binary mode. + Force the binary layer of the stdin, stdout and stderr streams (which is + available as their ``buffer`` attribute) to be unbuffered. The text I/O + layer will still be line-buffered. See also :envvar:`PYTHONUNBUFFERED`. diff --git a/Misc/python.man b/Misc/python.man index 9a406a8..b96c860 100644 --- a/Misc/python.man +++ b/Misc/python.man @@ -165,12 +165,12 @@ and the site-dependent manipulations of that it entails. .TP .B \-u -Force stdin, stdout and stderr to be totally unbuffered. On systems -where it matters, also put stdin, stdout and stderr in binary mode. -Note that there is internal buffering in 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. +Force the binary I/O layers of stdin, stdout and stderr to be unbuffered. +The text I/O layer will still be line-buffered. +.\" Note that there is internal buffering in 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. .TP .B \-v Print a message each time a module is initialized, showing the place -- cgit v0.12