https://github.com/python/cpython/commit/11d550c2f300f6259e96fd8238e8ce3e08f9a588
commit: 11d550c2f300f6259e96fd8238e8ce3e08f9a588
branch: 3.12
author: donBarbos <[email protected]>
committer: sobolevn <[email protected]>
date: 2025-03-09T07:33:56Z
summary:
[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 92e5f826ace1eab29920a0a3487a3cac7eeab925)
* remove extra paragraph
files:
M Doc/library/webbrowser.rst
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
index c34b2170f8f1e3..9c3ff5efa2ebd2 100644
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -33,11 +33,23 @@ allow the remote browser to maintain its own windows on the
display. If remote
browsers are not available on Unix, the controlling process will launch a new
browser and wait.
+.. program:: webbrowser
+
The script :program:`webbrowser` can be used as a command-line interface for
the
module. It accepts a URL as the argument. It accepts the following optional
-parameters: ``-n`` opens the URL in a new browser window, if possible;
-``-t`` opens the URL in a new browser page ("tab"). The options are,
-naturally, mutually exclusive. Usage example::
+parameters:
+
+.. option:: -n, --new-window
+
+ Opens the URL in a new browser window, if possible.
+
+.. option:: -t, --new-tab
+
+ Opens the URL in a new browser tab.
+
+The options are, naturally, mutually exclusive. Usage example:
+
+.. code-block:: bash
python -m webbrowser -t "https://www.python.org"
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]