FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-130160: Convert `webbrowser` docs to use `.. option` directive by sobolevn · Pull Request #130497 · python/cpython · GitHub

/ cpython Public
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 12 additions & 3 deletions Doc/library/webbrowser.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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 page ("tab").

hugovk Feb 24, 2025
edited by picnixz
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think we can update this too, browser tabs are now well established compared with when this feature was introduced in 2005: e8f244305ef4

(Opera had tabs in 2000, Safari in 2003, IE7 in 2006: https://en.wikipedia.org/wiki/Tab_(interface)#History)

Suggested change
Opens the URL in a new browser page ("tab").
Opens the URL in a new browser tab.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Oups, I missed the label :)


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"

Expand Down

Back | FazBrowse Home | New Git URL