Module webbrowser
[hide private]
[frames] | no frames]

Module webbrowser

Interfaces for launching and remotely controlling Web browsers.

Classes [hide private]
Error
BaseBrowser
Parent class for all browsers.
GenericBrowser
Class for all browsers started with a command and without remote functionality.
BackgroundBrowser
Class for all browsers which are to be started in the background.
UnixBrowser
Parent class for all Unix browsers with remote functionality.
Mozilla
Launcher class for Mozilla/Netscape browsers.
Netscape
Launcher class for Mozilla/Netscape browsers.
Galeon
Launcher class for Galeon/Epiphany browsers.
Opera
Launcher class for Opera browser.
Elinks
Launcher class for Elinks browsers.
Konqueror
Controller for the KDE File Manager (kfm, or Konqueror).
Grail
WindowsDefault
InternetConfig
MacOSX
Launcher class for Aqua browsers on Mac OS X
Functions [hide private]
 
register(name, klass, instance=None, update_tryorder=1)
Register a browser connector and, optionally, connection.
 
get(using=None)
Return a browser launcher instance appropriate for the environment.
 
open(url, new=0, autoraise=1)
 
open_new(url)
 
open_new_tab(url)
 
_synthesize(browser, update_tryorder=1)
Attempt to synthesize a controller base on existing controllers.
 
_isexecutable(cmd)
 
_iscommand(cmd)
Return True if cmd is executable or can be found on the executable search path.
 
register_X_browsers()
 
main()
Variables [hide private]
  _tryorder = ['gnome', 'mozilla-firefox', 'firefox', 'mozilla',...
  _browsers = {'epiphany': [None, <webbrowser.Galeon object at 0...

Imports: os, sys, stat, subprocess, time, ic


Function Details [hide private]

_synthesize(browser, update_tryorder=1)

 

Attempt to synthesize a controller base on existing controllers.

This is useful to create a controller when a user specifies a path to an entry in the BROWSER environment variable -- we can copy a general controller to operate using a specific installation of the desired browser in this way.

If we can't create a controller in this way, or if there is no executable for the requested browser, return [None, None].


Variables Details [hide private]

_tryorder

Value:
['gnome', 'mozilla-firefox', 'firefox', 'mozilla', 'epiphany', 'w3m']

_browsers

Value:
{}