[Python-checkins] cpython (3.4): pydoc: Add a note about setting PAGER to affect console output pagination.
zach.ware
python-checkins at python.org
Thu Nov 27 06:57:09 CET 2014
https://hg.python.org/cpython/rev/589c65dc528c
changeset: 93616:589c65dc528c
branch: 3.4
parent: 93614:ebb8865dcf54
user: Zachary Ware <zachary.ware at gmail.com>
date: Wed Nov 26 23:44:25 2014 -0600
summary:
pydoc: Add a note about setting PAGER to affect console output pagination.
Suggested by James Lowden on docs at .
files:
Doc/library/pydoc.rst | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst
--- a/Doc/library/pydoc.rst
+++ b/Doc/library/pydoc.rst
@@ -51,6 +51,10 @@
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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list