© 2025
gridranger
Random facts about me
2025-04-05
Degoogling
2025-03-08
Discovering the web-browser module
2025-02-02
`partial` and `partialmethod`
2025-01-30
WinRar icon, red, blue and green books strapped together with a leather belt. Archives
A colorful folder icon from Windows XP. Categories
Discovering the web-browser module - 2025-02-02

I like that after more than a decade of using Python I can still find something new in it.

Today I used the webbrowser module for the first time. It allows you to open URLs in the browser installed on the system. It's not new, but I've never had a reason to use it before.

It can be used from the command line or from a script, and is very customisable. You can choose the type of web browser, whether to open the page in a new window or tab, and whether to run in the foreground or background.


Sources: docs.python.org