diff --git a/Users/simon/miniconda/envs/viz/lib/python2.7/webbrowser.py.orig b/Users/simon/miniconda/envs/viz/lib/python2.7/webbrowser.py index d3272a0..baa9786 100755 --- a/Users/simon/miniconda/envs/viz/lib/python2.7/webbrowser.py.orig +++ b/Users/simon/miniconda/envs/viz/lib/python2.7/webbrowser.py @@ -578,9 +578,6 @@ if sys.platform == 'darwin': If no browser is specified, the default browser, as specified in the Internet System Preferences panel, will be used. """ - def __init__(self, name): - self.name = name - def open(self, url, new=0, autoraise=True): assert "'" not in url # hack for local urls @@ -615,11 +612,8 @@ if sys.platform == 'darwin': return not rc class MacOSXOSAScript(BaseBrowser): - def __init__(self, name): - self._name = name - def open(self, url, new=0, autoraise=True): - if self._name == 'default': + if self.name == 'default': script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser else: script = ''' @@ -627,7 +621,7 @@ if sys.platform == 'darwin': activate open location "%s" end - '''%(self._name, url.replace('"', '%22')) + '''%(self.name, url.replace('"', '%22')) osapipe = os.popen("osascript", "w") if osapipe is None: