FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

#8213: document behavior of -u on py3k better. · python/cpython@379299c · GitHub

Repository navigation

Commit 379299c

Browse files
committed
#8213: document behavior of -u on py3k better.
1 parent 0f3ec6d commit 379299c

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎Doc/using/cmdline.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ Miscellaneous options
232232

233233
.. cmdoption:: -u
234234

235-
Force stdin, stdout and stderr to be totally unbuffered. On systems where it
236-
matters, also put stdin, stdout and stderr in binary mode.
235+
Force the binary layer of the stdin, stdout and stderr streams (which is
236+
available as their ``buffer`` attribute) to be unbuffered. The text I/O
237+
layer will still be line-buffered.
237238

238239
See also :envvar:`PYTHONUNBUFFERED`.
239240

‎Misc/python.man‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ and the site-dependent manipulations of
165165
that it entails.
166166
.TP
167167
.B \-u
168-
Force stdin, stdout and stderr to be totally unbuffered. On systems
169-
where it matters, also put stdin, stdout and stderr in binary mode.
170-
Note that there is internal buffering in readlines() and
171-
file-object iterators ("for line in sys.stdin") which is not
172-
influenced by this option. To work around this, you will want to use
173-
"sys.stdin.readline()" inside a "while 1:" loop.
168+
Force the binary I/O layers of stdin, stdout and stderr to be unbuffered.
169+
The text I/O layer will still be line-buffered.
170+
.\" Note that there is internal buffering in readlines() and
171+
.\" file-object iterators ("for line in sys.stdin") which is not
172+
.\" influenced by this option. To work around this, you will want to use
173+
.\" "sys.stdin.readline()" inside a "while 1:" loop.
174174
.TP
175175
.B \-v
176176
Print a message each time a module is initialized, showing the place

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL