From 6263e72a4169765d35b78595a6559ea9facac5da Mon Sep 17 00:00:00 2001 From: Matthieu Ancellin <31126826+mancellin@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:30:39 +0200 Subject: [PATCH 1/2] doc: add missing information in pydoc documentation. --- Doc/library/pydoc.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index 70e9c604ebac4f..e8f153ee1b35ce 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -52,8 +52,9 @@ produced for that file. only execute code when a file is invoked as a script and not just imported. When printing output to the console, :program:`pydoc` attempts to paginate the -output for easier reading. If the :envvar:`PAGER` environment variable is set, -:program:`pydoc` will use its value as a pagination program. +output for easier reading. If either the :envvar:`MANPAGER` or the +:envvar:`PAGER` environment variable is set, :program:`pydoc` will use its +value as a pagination program. When both are set, :envvar:`MANPAGER` is used. Specifying a ``-w`` flag before the argument will cause HTML documentation to be written out to a file in the current directory, instead of displaying text From b801ec4fde337bf5b3d1c390e9f9c0e2f8623a5d Mon Sep 17 00:00:00 2001 From: Matthieu Ancellin <31126826+mancellin@users.noreply.github.com> Date: Sat, 12 Oct 2024 16:20:30 +0200 Subject: [PATCH 2/2] Add MANPAGER to conf.py --- Doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/conf.py b/Doc/conf.py index d7197b17865854..43145ffa442ac9 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -194,6 +194,7 @@ ('envvar', 'LC_TIME'), ('envvar', 'LINES'), ('envvar', 'LOGNAME'), + ('envvar', 'MANPAGER'), ('envvar', 'PAGER'), ('envvar', 'PATH'), ('envvar', 'PATHEXT'),