Kaydet (Commit) 7f580970 authored tarafından Berker Peksag's avatar Berker Peksag Kaydeden (comit) GitHub

bpo-28647: Update -u documentation after bpo-30404 (GH-3961)

üst b22273ec
...@@ -1275,9 +1275,9 @@ always available. ...@@ -1275,9 +1275,9 @@ always available.
Under all platforms though, you can override this value by setting the Under all platforms though, you can override this value by setting the
:envvar:`PYTHONIOENCODING` environment variable before starting Python. :envvar:`PYTHONIOENCODING` environment variable before starting Python.
* When interactive, standard streams are line-buffered. Otherwise, they * When interactive, ``stdout`` and ``stderr`` streams are line-buffered.
are block-buffered like regular text files. You can override this Otherwise, they are block-buffered like regular text files. You can
value with the :option:`-u` command-line option. override this value with the :option:`-u` command-line option.
.. note:: .. note::
......
...@@ -303,7 +303,8 @@ Miscellaneous options ...@@ -303,7 +303,8 @@ Miscellaneous options
.. cmdoption:: -u .. cmdoption:: -u
Force the stdout and stderr streams to be unbuffered. Force the stdout and stderr streams to be unbuffered. This option has no
effect on the stdin stream.
See also :envvar:`PYTHONUNBUFFERED`. See also :envvar:`PYTHONUNBUFFERED`.
......
...@@ -178,13 +178,8 @@ that it entails. Also disable these manipulations if ...@@ -178,13 +178,8 @@ that it entails. Also disable these manipulations if
is explicitly imported later. is explicitly imported later.
.TP .TP
.B \-u .B \-u
Force the binary I/O layers of stdout and stderr to be unbuffered. Force the stdout and stderr streams to be unbuffered.
stdin is always buffered. This option has no effect on the stdin stream.
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 .TP
.B \-v .B \-v
Print a message each time a module is initialized, showing the place Print a message each time a module is initialized, showing the place
......
...@@ -71,9 +71,8 @@ static const char usage_2[] = "\ ...@@ -71,9 +71,8 @@ static const char usage_2[] = "\
-S : don't imply 'import site' on initialization\n\ -S : don't imply 'import site' on initialization\n\
"; ";
static const char usage_3[] = "\ static const char usage_3[] = "\
-u : unbuffered binary stdout and stderr, stdin always buffered;\n\ -u : force the stdout and stderr streams to be unbuffered;\n\
also PYTHONUNBUFFERED=x\n\ this option has no effect on stdin; also PYTHONUNBUFFERED=x\n\
see man page for details on internal buffering relating to '-u'\n\
-v : verbose (trace import statements); also PYTHONVERBOSE=x\n\ -v : verbose (trace import statements); also PYTHONVERBOSE=x\n\
can be supplied multiple times to increase verbosity\n\ can be supplied multiple times to increase verbosity\n\
-V : print the Python version number and exit (also --version)\n\ -V : print the Python version number and exit (also --version)\n\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment