[Python-checkins] [3.10] gh-100583: Improve the `pydoc` documentation (GH-100590) (#100607)

kumaraditya303 webhook-mailer at python.org
Thu Dec 29 11:15:20 EST 2022


https://github.com/python/cpython/commit/2b1cc33db0b413c42393ea3a9b9cdf2c585d804a
commit: 2b1cc33db0b413c42393ea3a9b9cdf2c585d804a
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2022-12-29T21:45:13+05:30
summary:

[3.10] gh-100583: Improve the `pydoc` documentation  (GH-100590) (#100607)

gh-100583: Improve the `pydoc` documentation  (GH-100590)
(cherry picked from commit 7223d50b9785bc7b0cd76dcc68d97dabcbade4b6)

Co-authored-by: ram vikram singh <ramvikrams243 at gmail.com>

files:
M Doc/library/pydoc.rst

diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst
index 94daf4a58f9c..03e0915bf6d1 100644
--- a/Doc/library/pydoc.rst
+++ b/Doc/library/pydoc.rst
@@ -33,7 +33,7 @@ as text on the console.  The same text documentation can also be viewed from
 outside the Python interpreter by running :program:`pydoc` as a script at the
 operating system's command prompt. For example, running ::
 
-   pydoc sys
+   python -m pydoc sys
 
 at a shell prompt will display documentation on the :mod:`sys` module, in a
 style similar to the manual pages shown by the Unix :program:`man` command.  The
@@ -65,18 +65,18 @@ manner similar to the Unix :program:`man` command.  The synopsis line of a
 module is the first line of its documentation string.
 
 You can also use :program:`pydoc` to start an HTTP server on the local machine
-that will serve documentation to visiting web browsers.  :program:`pydoc -p 1234`
+that will serve documentation to visiting web browsers.  :program:`python -m pydoc -p 1234`
 will start a HTTP server on port 1234, allowing you to browse the
 documentation at ``http://localhost:1234/`` in your preferred web browser.
 Specifying ``0`` as the port number will select an arbitrary unused port.
 
-:program:`pydoc -n <hostname>` will start the server listening at the given
+:program:`python -m pydoc -n <hostname>` will start the server listening at the given
 hostname.  By default the hostname is 'localhost' but if you want the server to
 be reached from other machines, you may want to change the host name that the
 server responds to.  During development this is especially useful if you want
 to run pydoc from within a container.
 
-:program:`pydoc -b` will start the server and additionally open a web
+:program:`python -m pydoc -b` will start the server and additionally open a web
 browser to a module index page.  Each served page has a navigation bar at the
 top where you can *Get* help on an individual item, *Search* all modules with a
 keyword in their synopsis line, and go to the *Module index*, *Topics* and



More information about the Python-checkins mailing list