def openurl(url): try: webbrowser.open(url) except ImportError: # pre-webbrowser.py compatibility if sys.platform == 'win32': os.system('start "%s"' % url) elif sys.platform == 'mac': try: import ic except ImportError: pass else: ic.launchurl(url) else: rc = os.system('google-chrome -remote "openURL(%s)" &' % url) if rc: os.system('google-chrome "%s" &' % url)
def open_browser(self, url): try: import webbrowser webbrowser.open(url) except ImportError: # pre-webbrowser.py compatibility if sys.platform == 'win32': os.system('start "%s"' % url) elif sys.platform == 'mac': try: import ic except ImportError: pass else: ic.launchurl(url) else: rc = os.system('netscape -remote "openURL(%s)" &' % url) if rc: os.system('netscape "%s" &' % url)
def start_browser(): if sys.platform == 'darwin': # use Mac OS X internet config module (removed in Python 3.0) import ic ic.launchurl(url) else: try: import gconf client = gconf.client_get_default() browser = client.get_string( '/desktop/gnome/url-handlers/http/command') + '&' os.system(browser % url) except ImportError: # If gconf is not found, fall back to old standard os.system('firefox ' + url)
def start_browser(): if sys.platform == 'darwin': # use Mac OS X internet config module (removed in Python 3.0) import ic ic.launchurl(url) else: try: import mateconf client = mateconf.client_get_default() browser = client.get_string( '/desktop/mate/url-handlers/http/command') + '&' os.system(browser % url) except ImportError: # If mateconf is not found, fall back to old standard os.system('firefox ' + url)
def start_browser(): if sys.platform == "darwin": # use Mac OS X internet config module (removed in Python 3.0) import ic ic.launchurl(url) else: try: import mateconf client = mateconf.client_get_default() browser = client.get_string("/desktop/mate/url-handlers/http/command") + "&" os.system(browser % url) except ImportError: # If mateconf is not found, fall back to old standard os.system("firefox " + url)
def open(self, event=None, url=None): """opens a browser window on the local machine""" url = url or self.server.url try: import webbrowser webbrowser.open(url) except ImportError: # pre-webbrowser.py compatibility if sys.platform == 'win32': os.system('start "%s"' % url) elif sys.platform == 'mac': try: import ic ic.launchurl(url) except ImportError: pass else: rc = os.system('netscape -remote "openURL(%s)" &' % url) if rc: os.system('netscape "%s" &' % url)
def doInfo(event,GUIobj): """ open the browser at the given url """ import webbrowser url = system.url try: webbrowser.open(url) except ImportError: # pre-webbrowser.py compatibility import sys import os if sys.platform == 'win32': os.system('start "%s"' % url) elif sys.platform == 'mac': try: import ic except ImportError: pass else: ic.launchurl(url) else: rc = os.system('netscape -remote "openURL(%s)" &' % url) if rc: os.system('netscape "%s" &' % url)
def open(self, url, new=0, autoraise=1): ic.launchurl(url) return True # Any way to get status?
def open(self, url, new=0): ic.launchurl(url)