webbrowser module

webbrowser.BackgroundBrowser(name)

Class for all browsers which are to be started in the background.

webbrowser.BaseBrowser([name])

Parent class for all browsers.

webbrowser.Chrome([name])

Launcher class for Google Chrome browser.

webbrowser.Chromium

alias of webbrowser.Chrome

webbrowser.Elinks([name])

Launcher class for Elinks browsers.

webbrowser.Error

webbrowser.Galeon([name])

Launcher class for Galeon/Epiphany browsers.

webbrowser.GenericBrowser(name)

Class for all browsers started with a command and without remote functionality.

webbrowser.Grail([name])

webbrowser.Konqueror([name])

Controller for the KDE File Manager (kfm, or Konqueror).

webbrowser.Mozilla([name])

Launcher class for Mozilla browsers.

webbrowser.Netscape([name])

Launcher class for Netscape browser.

webbrowser.Opera([name])

Launcher class for Opera browser.

webbrowser.UnixBrowser([name])

Parent class for all Unix browsers with remote functionality.

Interfaces for launching and remotely controlling Web browsers.

exception Error[source]

Bases: Exception

get(using=None)[source]

Return a browser launcher instance appropriate for the environment.

open(url, new=0, autoraise=True)[source]

Display url using the default browser.

If possible, open url in a location determined by new. - 0: the same browser window (the default). - 1: a new browser window. - 2: a new browser page (“tab”). If possible, autoraise raises the window (the default) or not.

open_new(url)[source]

Open url in a new window of the default browser.

If not possible, then open url in the only browser window.

open_new_tab(url)[source]

Open url in a new page (“tab”) of the default browser.

If not possible, then the behavior becomes equivalent to open_new().

register(name, klass, instance=None, *, preferred=False)[source]

Register a browser connector.