Back to index

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

List of all members.

Public Member Functions

def open
def open_new
def open_new_tab

Public Attributes

 name
 basename
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Public Attributes

list args = ['%s']

Private Member Functions

def _find_grail_rc
def _remote

Detailed Description

Definition at line 384 of file webbrowser.py.


Member Function Documentation

def webbrowser.Grail._find_grail_rc (   self) [private]

Definition at line 388 of file webbrowser.py.

00388 
00389     def _find_grail_rc(self):
00390         import glob
00391         import pwd
00392         import socket
00393         import tempfile
00394         tempdir = os.path.join(tempfile.gettempdir(),
00395                                ".grail-unix")
00396         user = pwd.getpwuid(os.getuid())[0]
00397         filename = os.path.join(tempdir, user + "-*")
00398         maybes = glob.glob(filename)
00399         if not maybes:
00400             return None
00401         s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
00402         for fn in maybes:
00403             # need to PING each one until we find one that's live
00404             try:
00405                 s.connect(fn)
00406             except socket.error:
00407                 # no good; attempt to clean it out, but don't fail:
00408                 try:
00409                     os.unlink(fn)
00410                 except IOError:
00411                     pass
00412             else:
00413                 return s

Here is the call graph for this function:

Here is the caller graph for this function:

def webbrowser.Grail._remote (   self,
  action 
) [private]

Definition at line 414 of file webbrowser.py.

00414 
00415     def _remote(self, action):
00416         s = self._find_grail_rc()
00417         if not s:
00418             return 0
00419         s.send(action)
00420         s.close()
00421         return 1

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from webbrowser.BaseBrowser.

Definition at line 422 of file webbrowser.py.

00422 
00423     def open(self, url, new=0, autoraise=True):
00424         if new:
00425             ok = self._remote("LOADNEW " + url)
00426         else:
00427             ok = self._remote("LOAD " + url)
00428         return ok
00429 
00430 
00431 #
00432 # Platform support for Unix
00433 #
00434 
00435 # These are the right tests because all these Unix browsers require either
00436 # a console terminal or an X display to run.

Here is the call graph for this function:

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

list webbrowser.BaseBrowser.args = ['%s'] [static, inherited]

Reimplemented in webbrowser.GenericBrowser.

Definition at line 142 of file webbrowser.py.

Reimplemented in webbrowser.GenericBrowser.

Definition at line 146 of file webbrowser.py.

Reimplemented in webbrowser.MacOSX, and webbrowser.GenericBrowser.

Definition at line 145 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: