diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-06-08 08:29:33 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-06-08 08:29:33 (GMT) |
commit | bdec50f0277971830e307aff8090c1494a69f4ce (patch) | |
tree | 19ae2f89e1b093efd1062a997d9139c781b9d9a9 /Lib/os.py | |
parent | f30d60edbc0d5047a2fdd01e25868e4b814107e2 (diff) | |
download | cpython-bdec50f0277971830e307aff8090c1494a69f4ce.zip cpython-bdec50f0277971830e307aff8090c1494a69f4ce.tar.gz cpython-bdec50f0277971830e307aff8090c1494a69f4ce.tar.bz2 |
Feature request #935915: Add os.path.devnull.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -12,6 +12,7 @@ This exports: - os.pathsep is the component separator used in $PATH etc - 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 portable between different platforms. Of course, they must then @@ -28,7 +29,7 @@ _names = sys.builtin_module_names # Note: more names are added to __all__ later. __all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep", - "defpath", "name", "path"] + "defpath", "name", "path", "devnull"] def _get_exports_list(module): try: @@ -129,7 +130,8 @@ else: raise ImportError, 'no os specific module found' sys.modules['os.path'] = path -from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep +from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep, \ + devnull del _names |