Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1275,9 +1275,9 @@ always available.
Under all platforms though, you can override this value by setting the
:envvar:`PYTHONIOENCODING` environment variable before starting Python.

* When interactive, standard streams are line-buffered. Otherwise, they
are block-buffered like regular text files. You can override this
value with the :option:`-u` command-line option.
* When interactive, ``stdout`` and ``stderr`` streams are line-buffered.
Otherwise, they are block-buffered like regular text files. You can
override this value with the :option:`-u` command-line option.

.. note::

Expand Down
3 changes: 2 additions & 1 deletion Doc/using/cmdline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ Miscellaneous options

.. 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`.

Expand Down
9 changes: 2 additions & 7 deletions Misc/python.man
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,8 @@ that it entails. Also disable these manipulations if
is explicitly imported later.
.TP
.B \-u
Force the binary I/O layers of stdout and stderr to be unbuffered.
stdin is always buffered.
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.
Force the stdout and stderr streams to be unbuffered.
This option has no effect on the stdin stream.
.TP
.B \-v
Print a message each time a module is initialized, showing the place
Expand Down
5 changes: 2 additions & 3 deletions Modules/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ static const char usage_2[] = "\
-S : don't imply 'import site' on initialization\n\
";
static const char usage_3[] = "\
-u : unbuffered binary stdout and stderr, stdin always buffered;\n\
also PYTHONUNBUFFERED=x\n\
see man page for details on internal buffering relating to '-u'\n\
-u : force the stdout and stderr streams to be unbuffered;\n\
this option has no effect on stdin; also PYTHONUNBUFFERED=x\n\
-v : verbose (trace import statements); also PYTHONVERBOSE=x\n\
can be supplied multiple times to increase verbosity\n\
-V : print the Python version number and exit (also --version)\n\
Expand Down