Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
webbrowser.GenericBrowser Class Reference
Inheritance diagram for webbrowser.GenericBrowser:
Inheritance graph
[legend]
Collaboration diagram for webbrowser.GenericBrowser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def open
def open_new
def open_new_tab

Public Attributes

 name
 args
 basename
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

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

Definition at line 158 of file webbrowser.py.


Constructor & Destructor Documentation

def webbrowser.GenericBrowser.__init__ (   self,
  name 
)

Reimplemented from webbrowser.BaseBrowser.

Definition at line 162 of file webbrowser.py.

00162 
00163     def __init__(self, name):
00164         if isinstance(name, str):
00165             self.name = name
00166             self.args = ["%s"]
00167         else:
00168             # name should be a list with arguments
00169             self.name = name[0]
00170             self.args = name[1:]
00171         self.basename = os.path.basename(self.name)

Here is the caller graph for this function:


Member Function Documentation

def webbrowser.GenericBrowser.open (   self,
  url,
  new = 0,
  autoraise = True 
)

Reimplemented from webbrowser.BaseBrowser.

Reimplemented in webbrowser.BackgroundBrowser.

Definition at line 172 of file webbrowser.py.

00172 
00173     def open(self, url, new=0, autoraise=True):
00174         cmdline = [self.name] + [arg.replace("%s", url)
00175                                  for arg in self.args]
00176         try:
00177             if sys.platform[:3] == 'win':
00178                 p = subprocess.Popen(cmdline)
00179             else:
00180                 p = subprocess.Popen(cmdline, close_fds=True)
00181             return not p.wait()
00182         except OSError:
00183             return False
00184 

def webbrowser.BaseBrowser.open_new (   self,
  url 
) [inherited]

Definition at line 151 of file webbrowser.py.

00151 
00152     def open_new(self, url):
00153         return self.open(url, 1)

Here is the call graph for this function:

def webbrowser.BaseBrowser.open_new_tab (   self,
  url 
) [inherited]

Definition at line 154 of file webbrowser.py.

00154 
00155     def open_new_tab(self, url):
00156         return self.open(url, 2)
00157 

Here is the call graph for this function:


Member Data Documentation

Reimplemented from webbrowser.BaseBrowser.

Definition at line 165 of file webbrowser.py.

Reimplemented from webbrowser.BaseBrowser.

Definition at line 170 of file webbrowser.py.

Reimplemented from webbrowser.BaseBrowser.

Definition at line 164 of file webbrowser.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


The documentation for this class was generated from the following file: