diff options
author | Guido van Rossum <guido@python.org> | 1998-05-22 15:26:04 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-05-22 15:26:04 (GMT) |
commit | e9387ea773cdffeac5aa8ca094471bfc38ff6d03 (patch) | |
tree | e855c3b14d73b629d4a9696d8f2a0a31251ee287 /Lib | |
parent | fa0b6ab01a962cbe624ad55fc5068a6d6b50bd0f (diff) | |
download | cpython-e9387ea773cdffeac5aa8ca094471bfc38ff6d03.zip cpython-e9387ea773cdffeac5aa8ca094471bfc38ff6d03.tar.gz cpython-e9387ea773cdffeac5aa8ca094471bfc38ff6d03.tar.bz2 |
introduce a new platform-specific variable: os.linesep is the
platform's line separator. \n on Unix, \r\n on DOS, OS/2 and Windows,
\r on Macs.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/os.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -25,6 +25,7 @@ altsep = None if 'posix' in _names: name = 'posix' + linesep = '\n' curdir = '.'; pardir = '..'; sep = '/'; pathsep = ':' defpath = ':/bin:/usr/bin' from posix import * @@ -37,6 +38,7 @@ if 'posix' in _names: del posixpath elif 'nt' in _names: name = 'nt' + linesep = '\r\n' curdir = '.'; pardir = '..'; sep = '\\'; pathsep = ';' defpath = '.;C:\\bin' from nt import * @@ -49,6 +51,7 @@ elif 'nt' in _names: del ntpath elif 'dos' in _names: name = 'dos' + linesep = '\r\n' curdir = '.'; pardir = '..'; sep = '\\'; pathsep = ';' defpath = '.;C:\\bin' from dos import * @@ -61,6 +64,7 @@ elif 'dos' in _names: del dospath elif 'os2' in _names: name = 'os2' + linesep = '\r\n' curdir = '.'; pardir = '..'; sep = '\\'; pathsep = ';' defpath = '.;C:\\bin' from os2 import * @@ -73,6 +77,7 @@ elif 'os2' in _names: del ntpath elif 'mac' in _names: name = 'mac' + linesep = '\r' curdir = ':'; pardir = '::'; sep = ':'; pathsep = '\n' defpath = ':' from mac import * |