Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-130160: use.. program:: directive for documentingwebbrowser CLI#130995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sobolevn merged 1 commit intopython:mainfromdonBarbos:issue-130160-webbrowser
Mar 9, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use.. program:: directive for documentingwebbrowser CLI
  • Loading branch information
@donBarbos
donBarbos committedMar 8, 2025
commit3f4118a9ef5d468eb296fb248363d71a4c8eb2ee
15 changes: 12 additions & 3 deletionsDoc/library/webbrowser.rst
View file
Open in desktop
Original file line numberDiff line numberDiff 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 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"

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp