mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Merge 7e0a7adaa5 into 7308015d9c
This commit is contained in:
commit
4042b28479
1 changed files with 6 additions and 0 deletions
|
|
@ -644,6 +644,12 @@ 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 (e.g., ``NO_COLOR=1 python script.py 2> errors.txt``).
|
||||
|
||||
.. versionadded:: 3.14
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue