Back to index

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

List of all members.

Public Member Functions

def __init__
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 Attributes

 _name

Detailed Description

Definition at line 581 of file webbrowser.py.


Constructor & Destructor Documentation

def webbrowser.MacOSXOSAScript.__init__ (   self,
  name 
)

Reimplemented from webbrowser.BaseBrowser.

Definition at line 582 of file webbrowser.py.

00582 
00583         def __init__(self, name):
00584             self._name = name

Here is the caller graph for this function:


Member Function Documentation

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

Reimplemented from webbrowser.BaseBrowser.

Definition at line 585 of file webbrowser.py.

00585 
00586         def open(self, url, new=0, autoraise=True):
00587             if self._name == 'default':
00588                 script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
00589             else:
00590                 script = '''
00591                    tell application "%s"
00592                        activate
00593                        open location "%s"
00594                    end
00595                    '''%(self._name, url.replace('"', '%22'))
00596 
00597             osapipe = os.popen("osascript", "w")
00598             if osapipe is None:
00599                 return False
00600 
00601             osapipe.write(script)
00602             rc = osapipe.close()
00603             return not rc
00604 
00605 
    # Don't clear _tryorder or _browsers since OS X can use above Unix support

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

Definition at line 583 of file webbrowser.py.

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: