A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-October/030127.html below:

[Python-checkins] python/dist/src/Lib webbrowser.py,1.32,1.33

[Python-checkins] python/dist/src/Lib webbrowser.py,1.32,1.33nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Thu, 10 Oct 2002 15:49:36 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv15006/Lib

Modified Files:
	webbrowser.py 
Log Message:
SF # 585913, Adds Galeon support to webbrowser.py


Index: webbrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** webbrowser.py	2 Jun 2002 03:04:52 -0000	1.32
--- webbrowser.py	10 Oct 2002 22:49:29 -0000	1.33
***************
*** 136,139 ****
--- 136,166 ----
  
  
+ class Galeon:
+     """Launcher class for Galeon browsers."""
+     def __init__(self, name):
+         self.name = name
+         self.basename = os.path.basename(name)
+ 
+     def _remote(self, action, autoraise):
+         raise_opt = ("--noraise", "")[autoraise]
+         cmd = "%s %s %s >/dev/null 2>&1" % (self.name, raise_opt, action)
+         rc = os.system(cmd)
+         if rc:
+             import time
+             os.system("%s >/dev/null 2>&1 &" % self.name)
+             time.sleep(PROCESS_CREATION_DELAY)
+             rc = os.system(cmd)
+         return not rc
+ 
+     def open(self, url, new=0, autoraise=1):
+         if new:
+             self._remote("-w '%s'" % url, autoraise)
+         else:
+             self._remote("-n '%s'" % url, autoraise)
+ 
+     def open_new(self, url):
+         self.open(url, 1)
+ 
+ 
  class Konqueror:
      """Controller for the KDE File Manager (kfm, or Konqueror).
***************
*** 235,239 ****
  # an xterm.
  if os.environ.get("TERM") or os.environ.get("DISPLAY"):
!     _tryorder = ["mozilla","netscape","kfm","grail","links","lynx","w3m"]
  
      # Easy cases first -- register console browsers if we have them.
--- 262,267 ----
  # an xterm.
  if os.environ.get("TERM") or os.environ.get("DISPLAY"):
!     _tryorder = ["galeon", "mozilla", "netscape", "kfm",
!                  "grail", "links", "lynx", "w3m",]
  
      # Easy cases first -- register console browsers if we have them.
***************
*** 261,264 ****
--- 289,296 ----
              register("mosaic", None, GenericBrowser(
                  "mosaic '%s' >/dev/null &"))
+ 
+         # Gnome's Galeon
+         if _iscommand("galeon"):
+             register("galeon", None, Galeon("galeon"))
  
          # Konqueror/kfm, the KDE browser.





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4