|
12 | 12 | - os.pathsep is the component separator used in $PATH etc |
13 | 13 | - os.linesep is the line separator in text files ('\r' or '\n' or '\r\n') |
14 | 14 | - os.defpath is the default search path for executables |
| 15 | + - os.devnull is the file path of the null device ('/dev/null', etc.) |
15 | 16 |
|
16 | 17 | Programs that import and use 'os' stand a better chance of being |
17 | 18 | portable between different platforms. Of course, they must then |
|
28 | 29 |
|
29 | 30 | # Note: more names are added to __all__ later. |
30 | 31 | __all__ = ["altsep", "curdir", "pardir", "sep", "pathsep", "linesep", |
31 | | - "defpath", "name", "path"] |
| 32 | + "defpath", "name", "path", "devnull"] |
32 | 33 |
|
33 | 34 | def _get_exports_list(module): |
34 | 35 | try: |
@@ -129,7 +130,8 @@ def _get_exports_list(module): |
129 | 130 | raise ImportError, 'no os specific module found' |
130 | 131 |
|
131 | 132 | sys.modules['os.path'] = path |
132 | | -from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep |
| 133 | +from os.path import curdir, pardir, sep, pathsep, defpath, extsep, altsep, \ |
| 134 | + devnull |
133 | 135 |
|
134 | 136 | del _names |
135 | 137 |
|
|
0 commit comments