[Python-checkins] CVS: python/dist/src/Lib os.py,1.40,1.41 ntpath.py,1.33,1.34 nturl2path.py,1.7,1.8 nntplib.py,1.24,1.25 netrc.py,1.9,1.10 mutex.py,1.7,1.8 multifile.py,1.14,1.15

Skip Montanaro montanaro@users.sourceforge.net
Mon, 05 Feb 2001 17:07:04 -0800


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

Modified Files:
	os.py ntpath.py nturl2path.py nntplib.py netrc.py mutex.py 
	multifile.py 
Log Message:
added several more __all__ lists


Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** os.py	2001/01/15 00:50:52	1.40
--- os.py	2001/02/06 01:07:01	1.41
***************
*** 20,23 ****
--- 20,25 ----
  """
  
+ #'
+ 
  import sys
  
***************
*** 26,29 ****
--- 28,39 ----
  altsep = None
  
+ __all__ = []
+ 
+ def _get_exports_list(module):
+     try:
+         return list(module.__all__)
+     except AttributeError:
+         return [n for n in dir(module) if n[0] != '_']
+ 
  if 'posix' in _names:
      name = 'posix'
***************
*** 39,42 ****
--- 49,57 ----
      path = posixpath
      del posixpath
+ 
+     import posix
+     __all__.extend(_get_exports_list(posix))
+     del posix
+ 
  elif 'nt' in _names:
      name = 'nt'
***************
*** 53,56 ****
--- 68,76 ----
      path = ntpath
      del ntpath
+ 
+     import nt
+     __all__.extend(_get_exports_list(nt))
+     del nt
+ 
  elif 'dos' in _names:
      name = 'dos'
***************
*** 66,69 ****
--- 86,94 ----
      path = dospath
      del dospath
+ 
+     import dos
+     __all__.extend(_get_exports_list(dos))
+     del dos
+ 
  elif 'os2' in _names:
      name = 'os2'
***************
*** 79,82 ****
--- 104,112 ----
      path = ntpath
      del ntpath
+ 
+     import os2
+     __all__.extend(_get_exports_list(os2))
+     del os2
+ 
  elif 'mac' in _names:
      name = 'mac'
***************
*** 92,95 ****
--- 122,130 ----
      path = macpath
      del macpath
+ 
+     import mac
+     __all__.extend(_get_exports_list(mac))
+     del mac
+ 
  elif 'ce' in _names:
      name = 'ce'
***************
*** 107,117 ****
--- 142,161 ----
      path = ntpath
      del ntpath
+ 
+     import ce
+     __all__.extend(_get_exports_list(ce))
+     del ce
+ 
  else:
      raise ImportError, 'no os specific module found'
  
+ __all__.append("path")
+ 
  del _names
  
  sys.modules['os.path'] = path
  
+ #'
+ 
  # Super directory utilities.
  # (Inspired by Eric Raymond; the doc strings are mostly his)
***************
*** 181,184 ****
--- 225,230 ----
              pass
  
+ __all__.extend(["makedirs", "removedirs", "renames"])
+ 
  # Make sure os.environ exists, at least
  try:
***************
*** 235,238 ****
--- 281,286 ----
      _execvpe(file, args, env)
  
+ __all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
+ 
  _notfound = None
  def _execvpe(file, args, env=None):
***************
*** 320,323 ****
--- 368,372 ----
      The optional second argument can specify an alternate default."""
      return environ.get(key, default)
+ __all__.append("getenv")
  
  def _exists(name):
***************
*** 455,458 ****
--- 504,511 ----
  
  
+     __all__.extend(["spawnlp","spawnlpe","spawnv", "spawnve","spawnvp",
+                     "spawnvpe","spawnl","spawnle",])
+ 
+ 
  # Supply popen2 etc. (for Unix)
  if _exists("fork"):
***************
*** 462,465 ****
--- 515,519 ----
              stdout, stdin = popen2.popen2(cmd, bufsize)
              return stdin, stdout
+         __all__.append("popen2")
  
      if not _exists("popen3"):
***************
*** 468,471 ****
--- 522,526 ----
              stdout, stdin, stderr = popen2.popen3(cmd, bufsize)
              return stdin, stdout, stderr
+         __all__.append("popen3")
  
      if not _exists("popen4"):
***************
*** 474,475 ****
--- 529,531 ----
              stdout, stdin = popen2.popen4(cmd, bufsize)
              return stdin, stdout
+         __all__.append("popen4")

Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** ntpath.py	2001/01/15 00:50:52	1.33
--- ntpath.py	2001/02/06 01:07:01	1.34
***************
*** 9,12 ****
--- 9,16 ----
  import stat
  
+ __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
+            "basename","dirname","commonprefix","getsize","getmtime",
+            "getatime","islink","exists","isdir","isfile","ismount",
+            "walk","expanduser","expandvars","normpath","abspath","splitunc"]
  
  # Normalize the case of a pathname and map slashes to backslashes.

Index: nturl2path.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nturl2path.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** nturl2path.py	2001/01/15 00:50:52	1.7
--- nturl2path.py	2001/02/06 01:07:01	1.8
***************
*** 1,4 ****
--- 1,6 ----
  """Convert a NT pathname to a file URL and vice versa."""
  
+ __all__ = ["url2pathname"]
+ 
  def url2pathname(url):
      r"""Convert a URL to a DOS path.

Index: nntplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nntplib.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** nntplib.py	2001/01/16 07:12:46	1.24
--- nntplib.py	2001/02/06 01:07:01	1.25
***************
*** 34,38 ****
  import string
  
! 
  
  # Exceptions raised when an error or invalid response is received
--- 34,41 ----
  import string
  
! __all__ = ["NNTP","NNTPReplyError","NNTPTemporaryError",
!            "NNTPPermanentError","NNTPProtocolError","NNTPDataError",
!            "error_reply","error_temp","error_perm","error_proto",
!            "error_data",]
  
  # Exceptions raised when an error or invalid response is received

Index: netrc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** netrc.py	2001/01/15 00:50:52	1.9
--- netrc.py	2001/02/06 01:07:01	1.10
***************
*** 5,8 ****
--- 5,10 ----
  import os, shlex
  
+ __all__ = ["netrc"]
+ 
  class netrc:
      def __init__(self, file=None):

Index: mutex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mutex.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** mutex.py	2001/01/14 23:47:14	1.7
--- mutex.py	2001/02/06 01:07:01	1.8
***************
*** 13,16 ****
--- 13,18 ----
  """
  
+ __all__ = ["mutex"]
+ 
  class mutex:
      def __init__(self):

Index: multifile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/multifile.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** multifile.py	2001/01/14 23:47:14	1.14
--- multifile.py	2001/02/06 01:07:01	1.15
***************
*** 31,34 ****
--- 31,36 ----
  import string
  
+ __all__ = ["MultiFile","Error"]
+ 
  class Error(Exception):
      pass