Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
webbrowser Namespace Reference

Data Structures

class  Error
 
class  GenericBrowser
 
class  Netscape
 
class  Konqueror
 
class  Grail
 
class  WindowsDefault
 
class  InternetConfig
 

Functions

def register
 
def get
 
def open
 
def open_new
 

Variables

list __all__ = ["Error", "open", "get", "register"]
 
dictionary _browsers = {}
 
list _tryorder = []
 
int PROCESS_CREATION_DELAY = 4
 

Detailed Description

Interfaces for launching and remotely controlling Web browsers.

Function Documentation

def webbrowser.get (   using = None)
Return a browser launcher instance appropriate for the environment.

Definition at line 18 of file webbrowser.py.

18 
19 def get(using=None):
20  """Return a browser launcher instance appropriate for the environment."""
21  if using:
22  alternatives = [using]
23  else:
24  alternatives = _tryorder
25  for browser in alternatives:
26  if browser.find('%s') > -1:
27  # User gave us a command line, don't mess with it.
28  return GenericBrowser(browser)
29  else:
30  # User gave us a browser name.
31  try:
32  command = _browsers[browser.lower()]
33  except KeyError:
34  command = _synthesize(browser)
35  if command[1] is None:
36  return command[0]()
37  else:
38  return command[1]
39  raise Error("could not locate runnable browser")
40 
41 # Please note: the following definition hides a builtin function.
def webbrowser.open (   url,
  new = 0,
  autoraise = 1 
)

Definition at line 42 of file webbrowser.py.

References get().

42 
43 def open(url, new=0, autoraise=1):
44  get().open(url, new, autoraise)
def webbrowser.open_new (   url)

Definition at line 45 of file webbrowser.py.

References copy.copy(), get(), open(), and register().

45 
46 def open_new(url):
47  get().open(url, 1)
48 
def webbrowser.register (   name,
  klass,
  instance = None 
)
Register a browser connector and, optionally, connection.

Definition at line 14 of file webbrowser.py.

14 
15 def register(name, klass, instance=None):
16  """Register a browser connector and, optionally, connection."""
17  _browsers[name.lower()] = [klass, instance]

Variable Documentation

list __all__ = ["Error", "open", "get", "register"]

Definition at line 6 of file webbrowser.py.

dictionary _browsers = {}

Definition at line 11 of file webbrowser.py.

tuple _tryorder = []

Definition at line 12 of file webbrowser.py.

int PROCESS_CREATION_DELAY = 4

Definition at line 92 of file webbrowser.py.