Skip to content

Commit 2bbedd9

Browse files
committed
Update docs for pydoc.
1 parent 8a7eb0a commit 2bbedd9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/library/pydoc.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ 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
74+
hostname. By default the hostname is 'localhost' but if you want the server to
75+
be reached from other machines, you may want to change the host name that the
76+
server responds to. During development this is especially useful if you want
77+
to run pydoc from within a container.
78+
7379
:program:`pydoc -b` will start the server and additionally open a web
7480
browser to a module index page. Each served page has a navigation bar at the
7581
top where you can *Get* help on an individual item, *Search* all modules with a
@@ -98,3 +104,7 @@ Reference Manual pages.
98104
:mod:`pydoc` now uses :func:`inspect.signature` rather than
99105
:func:`inspect.getfullargspec` to extract signature information from
100106
callables.
107+
108+
.. versionchanged:: 3.7
109+
Added the ``-n`` option.
110+

0 commit comments

Comments
 (0)