From: Zachary Ware Date: Thu, 27 Nov 2014 05:44:25 +0000 (-0600) Subject: pydoc: Add a note about setting PAGER to affect console output pagination. X-Git-Tag: v3.4.3rc1~302 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48470354588ced3f635ad15cc77490f0d4536ab3;p=thirdparty%2FPython%2Fcpython.git pydoc: Add a note about setting PAGER to affect console output pagination. Suggested by James Lowden on docs@. --- diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index cec8a9a93811..b5e3233619cd 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -51,6 +51,10 @@ produced for that file. executed on that occasion. Use an ``if __name__ == '__main__':`` guard to 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. + 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 on the console.