Skip to content

Commit 7223d50

Browse files
authored
pythongh-100583: Improve the pydoc documentation (python#100590)
1 parent 7685636 commit 7223d50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/pydoc.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ as text on the console. The same text documentation can also be viewed from
3333
outside the Python interpreter by running :program:`pydoc` as a script at the
3434
operating system's command prompt. For example, running ::
3535

36-
pydoc sys
36+
python -m pydoc sys
3737

3838
at a shell prompt will display documentation on the :mod:`sys` module, in a
3939
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
6565
module is the first line of its documentation string.
6666

6767
You can also use :program:`pydoc` to start an HTTP server on the local machine
68-
that will serve documentation to visiting web browsers. :program:`pydoc -p 1234`
68+
that will serve documentation to visiting web browsers. :program:`python -m pydoc -p 1234`
6969
will start a HTTP server on port 1234, allowing you to browse the
7070
documentation at ``http://localhost:1234/`` in your preferred web browser.
7171
Specifying ``0`` as the port number will select an arbitrary unused port.
7272

73-
:program:`pydoc -n <hostname>` will start the server listening at the given
73+
:program:`python -m pydoc -n <hostname>` will start the server listening at the given
7474
hostname. By default the hostname is 'localhost' but if you want the server to
7575
be reached from other machines, you may want to change the host name that the
7676
server responds to. During development this is especially useful if you want
7777
to run pydoc from within a container.
7878

79-
:program:`pydoc -b` will start the server and additionally open a web
79+
:program:`python -m pydoc -b` will start the server and additionally open a web
8080
browser to a module index page. Each served page has a navigation bar at the
8181
top where you can *Get* help on an individual item, *Search* all modules with a
8282
keyword in their synopsis line, and go to the *Module index*, *Topics* and

0 commit comments

Comments
 (0)