From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 29 Oct 2024 23:26:29 +0000 (+0100) Subject: [3.12] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126153) X-Git-Tag: v3.12.8~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7812dc37ab2c1ec79c93656f951252aa84652593;p=thirdparty%2FPython%2Fcpython.git [3.12] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126153) Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (cherry picked from commit 0e45b1fd0ffbb165f580ecdfd5234c1d54389501) Co-authored-by: Matthieu Ancellin <31126826+mancellin@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- diff --git a/Doc/conf.py b/Doc/conf.py index 938a61347bac..4e76c21fe0c6 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -178,6 +178,7 @@ nitpick_ignore = [ ('envvar', 'LC_TIME'), ('envvar', 'LINES'), ('envvar', 'LOGNAME'), + ('envvar', 'MANPAGER'), ('envvar', 'PAGER'), ('envvar', 'PATH'), ('envvar', 'PATHEXT'), diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index 70e9c604ebac..e8f153ee1b35 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