Skip to content
Merged
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
7 changes: 7 additions & 0 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,13 @@ variables and terminal capabilities. However, if ``color=False``, colored
output is always disabled, even if environment variables like ``FORCE_COLOR``
are set.

.. note::

Error messages will include color codes when redirecting stderr to a
file. To avoid this, set the |NO_COLOR|_ or :envvar:`PYTHON_COLORS`
environment variable (for example,
``NO_COLOR=1 python script.py 2> errors.txt``).

.. versionadded:: 3.14


Expand Down
Loading