https://github.com/python/cpython/commit/92e5f826ace1eab29920a0a3487a3cac7eeab925 commit: 92e5f826ace1eab29920a0a3487a3cac7eeab925 branch: main author: donBarbos <donbar...@proton.me> committer: sobolevn <m...@sobolevn.me> date: 2025-03-09T09:57:59+03:00 summary:
gh-130160: use `.. program::` directive for documenting `webbrowser` CLI (#130995) use `.. program::` directive for documenting `webbrowser` CLI files: M Doc/library/webbrowser.rst diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst index 2d19c514ce43b6..d33e7344761f4a 100644 --- a/Doc/library/webbrowser.rst +++ b/Doc/library/webbrowser.rst @@ -40,14 +40,23 @@ a new tab, with the browser being brought to the foreground. The use of the :mod:`webbrowser` module on iOS requires the :mod:`ctypes` module. If :mod:`ctypes` isn't available, calls to :func:`.open` will fail. +.. 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``/``--new-window`` opens the URL in a new browser window, if possible. -* ``-t``/``--new-tab`` opens the URL in a new browser page ("tab"). +.. 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: -The options are, naturally, mutually exclusive. Usage example:: +.. code-block:: bash python -m webbrowser -t "https://www.python.org" _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com