• Home
  • Raw
  • Download

Lines Matching full:browser

18 _browsers = {}                  # Dictionary of available browser controllers
20 _os_preferred_browser = None # The preferred browser
23 """Register a browser connector."""
30 # Need to match to the default browser returned by xdg-settings, which
38 """Return a browser launcher instance appropriate for the environment."""
47 for browser in alternatives:
48 if '%s' in browser:
50 browser = shlex.split(browser)
51 if browser[-1] == '&':
52 return BackgroundBrowser(browser[:-1])
54 return GenericBrowser(browser)
56 # User gave us a browser name or path.
58 command = _browsers[browser.lower()]
60 command = _synthesize(browser)
65 raise Error("could not locate runnable browser")
72 """Display url using the default browser.
75 - 0: the same browser window (the default).
76 - 1: a new browser window.
77 - 2: a new browser page ("tab").
85 browser = get(name)
86 if browser.open(url, new, autoraise):
91 """Open url in a new window of the default browser.
93 If not possible, then open url in the only browser window.
98 """Open url in a new page ("tab") of the default browser.
105 def _synthesize(browser, *, preferred=False): argument
109 an entry in the BROWSER environment variable -- we can copy a general
111 browser in this way.
114 executable for the requested browser, return [None, None].
117 cmd = browser.split()[0]
130 controller.name = browser
131 controller.basename = os.path.basename(browser)
132 register(browser, None, instance=controller, preferred=preferred)
295 """Launcher class for Netscape browser."""
316 "Launcher class for Google Chrome browser."
328 "Launcher class for Opera browser."
464 # The default GNOME3 browser
468 # The default GNOME browser
472 # The default KDE browser
476 if shutil.which("x-www-browser"):
477 register("x-www-browser", None, BackgroundBrowser("x-www-browser"))
480 for browser in ("firefox", "iceweasel", "iceape", "seamonkey"):
481 if shutil.which(browser):
482 register(browser, None, Mozilla(browser))
485 for browser in ("mozilla-firefox",
488 if shutil.which(browser):
489 register(browser, None, Netscape(browser))
491 # Konqueror/kfm, the KDE browser.
498 for browser in ("galeon", "epiphany"):
499 if shutil.which(browser):
500 register(browser, None, Galeon(browser))
502 # Skipstone, another Gtk/Mozilla based browser
507 for browser in ("google-chrome", "chrome", "chromium", "chromium-browser"):
508 if shutil.which(browser):
509 register(browser, None, Chrome(browser))
519 # Grail, the Python browser. Does anybody still use it?
536 # First try to use the default Windows browser
542 for browser in ("firefox", "firebird", "seamonkey", "mozilla",
544 if shutil.which(browser):
545 register(browser, None, BackgroundBrowser(browser))
550 cmd = "xdg-settings get default-web-browser".split()
563 if shutil.which("www-browser"):
564 register("www-browser", None, GenericBrowser("www-browser"))
570 # The Lynx browser <http://lynx.isc.org/>, <http://lynx.browser.org/>
573 # The w3m browser <http://w3m.sourceforge.net/>
578 # platform are, allow user to override them with the BROWSER variable.
579 if "BROWSER" in os.environ:
580 userchoices = os.environ["BROWSER"].split(os.pathsep)
620 Optionally specify a browser name on instantiation. Note that this
624 If no browser is specified, the default browser, as specified in the
640 # User called open, open_new or get without a browser parameter
641 script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
643 # User called get and chose a browser
670 script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser