Skip to content

Commit 12f0bbd

Browse files
authored
gh-112730: Update docs for colour env vars (#112837)
1 parent 29f7eb4 commit 12f0bbd

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Doc/using/cmdline.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,9 @@ Miscellaneous options
610610
.. versionadded:: 3.13
611611
The ``-X presite`` option.
612612

613-
Controlling Color
613+
.. _using-on-controlling-color:
614+
615+
Controlling color
614616
~~~~~~~~~~~~~~~~~
615617

616618
The Python interpreter is configured by default to use colors to highlight
@@ -1133,6 +1135,7 @@ conflict.
11331135

11341136
If this variable is set to ``1``, the interpreter will colorize various kinds
11351137
of output. Setting it to ``0`` deactivates this behavior.
1138+
See also :ref:`using-on-controlling-color`.
11361139

11371140
.. versionadded:: 3.13
11381141

Doc/whatsnew/3.13.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ Improved Error Messages
9191
* The interpreter now colorizes error messages when displaying tracebacks by default.
9292
This feature can be controlled via the new :envvar:`PYTHON_COLORS` environment
9393
variable as well as the canonical ``NO_COLOR`` and ``FORCE_COLOR`` environment
94-
variables. (Contributed by Pablo Galindo Salgado in :gh:`112730`.)
94+
variables. See also :ref:`using-on-controlling-color`.
95+
(Contributed by Pablo Galindo Salgado in :gh:`112730`.)
9596

9697
Other Language Changes
9798
======================

Misc/python.man

+3
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ show how long each import takes. This is exactly equivalent to setting
601601
.IP PYTHONBREAKPOINT
602602
If this environment variable is set to 0, it disables the default debugger. It
603603
can be set to the callable of your debugger of choice.
604+
.IP PYTHON_COLORS
605+
If this variable is set to 1, the interpreter will colorize various kinds of
606+
output. Setting it to 0 deactivates this behavior.
604607
.SS Debug-mode variables
605608
Setting these variables only has an effect in a debug build of Python, that is,
606609
if Python was configured with the

0 commit comments

Comments
 (0)