Skip to content

Commit 11d550c

Browse files
authored
[3.12] gh-130160: use .. program:: directive for documenting webbrowser CLI (GH-130995) (#131004)
* gh-130160: use `.. program::` directive for documenting `webbrowser` CLI (#130995) use `.. program::` directive for documenting `webbrowser` CLI (cherry picked from commit 92e5f82) * remove extra paragraph
1 parent 552dad1 commit 11d550c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

Doc/library/webbrowser.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,23 @@ allow the remote browser to maintain its own windows on the display. If remote
3333
browsers are not available on Unix, the controlling process will launch a new
3434
browser and wait.
3535

36+
.. program:: webbrowser
37+
3638
The script :program:`webbrowser` can be used as a command-line interface for the
3739
module. It accepts a URL as the argument. It accepts the following optional
38-
parameters: ``-n`` opens the URL in a new browser window, if possible;
39-
``-t`` opens the URL in a new browser page ("tab"). The options are,
40-
naturally, mutually exclusive. Usage example::
40+
parameters:
41+
42+
.. option:: -n, --new-window
43+
44+
Opens the URL in a new browser window, if possible.
45+
46+
.. option:: -t, --new-tab
47+
48+
Opens the URL in a new browser tab.
49+
50+
The options are, naturally, mutually exclusive. Usage example:
51+
52+
.. code-block:: bash
4153
4254
python -m webbrowser -t "https://www.python.org"
4355

0 commit comments

Comments
 (0)