[Python-checkins] python/dist/src/Lib macpath.py, 1.47, 1.48 ntpath.py, 1.58, 1.59 os.py, 1.76, 1.77 os2emxpath.py, 1.11, 1.12 posixpath.py, 1.65, 1.66

loewis at users.sourceforge.net loewis at users.sourceforge.net
Tue Jun 8 04:29:36 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32478/Lib

Modified Files:
	macpath.py ntpath.py os.py os2emxpath.py posixpath.py 
Log Message:
Feature request #935915: Add os.path.devnull.


Index: macpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/macpath.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** macpath.py	27 Feb 2003 23:18:45 -0000	1.47
--- macpath.py	8 Jun 2004 08:29:32 -0000	1.48
***************
*** 9,13 ****
             "walk","expanduser","expandvars","normpath","abspath",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
--- 9,13 ----
             "walk","expanduser","expandvars","normpath","abspath",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "devnull","realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
***************
*** 19,22 ****
--- 19,23 ----
  defpath = ':'
  altsep = None
+ devnull = 'Dev:Null'
  
  # Normalize the case of a pathname.  Dummy in Posix, but <s>.lower() here.

Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** ntpath.py	20 Oct 2003 14:01:50 -0000	1.58
--- ntpath.py	8 Jun 2004 08:29:32 -0000	1.59
***************
*** 15,19 ****
             "walk","expanduser","expandvars","normpath","abspath","splitunc",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
--- 15,19 ----
             "walk","expanduser","expandvars","normpath","abspath","splitunc",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "devnull","realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
***************
*** 30,33 ****
--- 30,34 ----
      # OS/2 w/ VACPP
      altsep = '/'
+ devnull = 'nul'
  
  # Normalize the case of a pathname and map slashes to backslashes.

Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** os.py	4 Apr 2004 07:11:43 -0000	1.76
--- os.py	8 Jun 2004 08:29:32 -0000	1.77
***************
*** 13,16 ****
--- 13,17 ----
    - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
    - os.defpath is the default search path for executables
+   - os.devnull is the file path of the null device ('/dev/null', etc.)
  
  Programs that import and use 'os' stand a better chance of being
***************
*** 29,33 ****
  # Note:  more names are added to __all__ later.
  __all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep",
!            "defpath", "name", "path"]
  
  def _get_exports_list(module):
--- 30,34 ----
  # Note:  more names are added to __all__ later.
  __all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep",
!            "defpath", "name", "path", "devnull"]
  
  def _get_exports_list(module):
***************
*** 130,134 ****
  
  sys.modules['os.path'] = path
! from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep
  
  del _names
--- 131,136 ----
  
  sys.modules['os.path'] = path
! from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep, \
!     devnull
  
  del _names

Index: os2emxpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os2emxpath.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** os2emxpath.py	20 Oct 2003 14:01:50 -0000	1.11
--- os2emxpath.py	8 Jun 2004 08:29:32 -0000	1.12
***************
*** 14,18 ****
             "walk","expanduser","expandvars","normpath","abspath","splitunc",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
--- 14,18 ----
             "walk","expanduser","expandvars","normpath","abspath","splitunc",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "devnull","realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
***************
*** 24,27 ****
--- 24,28 ----
  pathsep = ';'
  defpath = '.;C:\\bin'
+ devnull = 'nul'
  
  # Normalize the case of a pathname and map slashes to backslashes.

Index: posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/posixpath.py,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** posixpath.py	12 May 2004 03:51:39 -0000	1.65
--- posixpath.py	8 Jun 2004 08:29:32 -0000	1.66
***************
*** 20,24 ****
             "samefile","sameopenfile","samestat",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
--- 20,24 ----
             "samefile","sameopenfile","samestat",
             "curdir","pardir","sep","pathsep","defpath","altsep","extsep",
!            "devnull","realpath","supports_unicode_filenames"]
  
  # strings representing various path-related bits and pieces
***************
*** 30,33 ****
--- 30,34 ----
  defpath = ':/bin:/usr/bin'
  altsep = None
+ devnull = '/dev/null'
  
  # Normalize the case of a pathname.  Trivial in Posix, string.lower on Mac.




More information about the Python-checkins mailing list