Skip to content

Commit ae519a1

Browse files
authored
Update documentation
1 parent b243c4b commit ae519a1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Lib/pydoc.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ class or function within a module or module in a package. If the
1616
Run "pydoc -k <keyword>" to search for a keyword in the synopsis lines
1717
of all available modules.
1818
19+
Run "pydoc -n <hostname>" to start an HTTP server with the given
20+
hostname (default: localhost) on the local machine.
21+
1922
Run "pydoc -p <port>" to start an HTTP server on the given port on the
2023
local machine. Port number 0 can be used to get an arbitrary unused port.
2124
2225
Run "pydoc -b" to start an HTTP server on an arbitrary unused port and
23-
open a Web browser to interactively browse documentation. The -p option
24-
can be used with the -b option to explicitly specify the server port.
26+
open a Web browser to interactively browse documentation. Combine with
27+
the -n and -p options to control the hostname and port used.
2528
2629
Run "pydoc -w <name>" to write out the HTML documentation for a module
2730
to a file named "<name>.html".
@@ -2687,8 +2690,8 @@ class BadUsage(Exception): pass
26872690
26882691
{cmd} -b
26892692
Start an HTTP server on an arbitrary unused port and open a Web browser
2690-
to interactively browse documentation. The -p option can be used with
2691-
the -b option to explicitly specify the server port.
2693+
to interactively browse documentation. This option can be used in
2694+
combination with -n and/or -p.
26922695
26932696
{cmd} -w <name> ...
26942697
Write out the HTML documentation for a module to a file in the current

0 commit comments

Comments
 (0)