TIL: Python's `webbrowser` module


Open a webbrowser to a specific page with Python's webbrowser module.

I was thinking this would be very useful in do nothing scripts.

Example 1:

>>> import webbrowser
>>> url = "https://sglmr.com"
>>> webbrowser.open(url)

Example 2:

python -m webbrowser "https://www.python.org"

Example 3:

uv run -m webbrowser "https://example.com"