[Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.11,1.12

Jeremy Hylton jhylton@users.sourceforge.net
Tue, 27 Feb 2001 10:44:16 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv24204

Modified Files:
	webbrowser.py 
Log Message:
Remove two meaningless, module-level global statements (one of a
non-existent variable :-).

Reflow long lines.


Index: webbrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** webbrowser.py	2001/02/09 20:06:00	1.11
--- webbrowser.py	2001/02/27 18:44:14	1.12
***************
*** 58,62 ****
  if os.environ.get("TERM") or os.environ.get("DISPLAY"):
      PROCESS_CREATION_DELAY = 4
-     global tryorder
      _tryorder = ("mozilla","netscape","kfm","grail","links","lynx","w3m")
  
--- 58,61 ----
***************
*** 105,109 ****
                  def _remote(self, action, autoraise):
                      raise_opt = ("-noraise", "-raise")[autoraise]
!                     cmd = "%s %s -remote '%s' >/dev/null 2>&1" % (self.name, raise_opt, action)
                      rc = os.system(cmd)
                      if rc:
--- 104,110 ----
                  def _remote(self, action, autoraise):
                      raise_opt = ("-noraise", "-raise")[autoraise]
!                     cmd = "%s %s -remote '%s' >/dev/null 2>&1" % (self.name,
!                                                                   raise_opt,
!                                                                   action)
                      rc = os.system(cmd)
                      if rc:
***************
*** 153,157 ****
  
                  def open(self, url, new=1, autoraise=1):
!                     # XXX Currently I know no way to prevent KFM from opening a new win.
                      self._remote("openURL %s" % url)
  
--- 154,159 ----
  
                  def open(self, url, new=1, autoraise=1):
!                     # XXX Currently I know no way to prevent KFM from
!                     # opening a new win. 
                      self._remote("openURL %s" % url)
  
***************
*** 172,176 ****
                      import socket
                      import tempfile
!                     tempdir = os.path.join(tempfile.gettempdir(), ".grail-unix")
                      user = pwd.getpwuid(_os.getuid())[0]
                      filename = os.path.join(tempdir, user + "-*")
--- 174,179 ----
                      import socket
                      import tempfile
!                     tempdir = os.path.join(tempfile.gettempdir(),
!                                            ".grail-unix")
                      user = pwd.getpwuid(_os.getuid())[0]
                      filename = os.path.join(tempdir, user + "-*")
***************
*** 217,221 ****
  
  if sys.platform[:3] == "win":
-     global _tryorder
      _tryorder = ("netscape", "windows-default")
  
--- 220,223 ----
***************
*** 261,266 ****
      # avoid has_key() tests at runtime.  (This may also allow some unused
      # classes and class-instance storage to be garbage-collected.)
!     _tryorder = filter(lambda x: _browsers.has_key(x.lower()) or x.find("%s")>-1,\
!                        _tryorder)
  
  # end
--- 263,268 ----
      # avoid has_key() tests at runtime.  (This may also allow some unused
      # classes and class-instance storage to be garbage-collected.)
!     _tryorder = filter(lambda x: _browsers.has_key(x.lower())
!                        or x.find("%s") > -1, _tryorder)
  
  # end