]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add separator
authorGuido van Rossum <guido@python.org>
Mon, 6 Apr 1992 14:03:45 +0000 (14:03 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 6 Apr 1992 14:03:45 +0000 (14:03 +0000)
Lib/os.py

index 4212232c947bce6207beb587bc2c8959200ee626..af0ce8956043d085745803df7f5f41c02725783a 100644 (file)
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -6,6 +6,7 @@
 # - os.name is either 'posix' or 'mac'
 # - os.curdir is a string representing the current directory ('.' or ':')
 # - os.pardir is a string representing the parent directory ('..' or '::')
+# - os.sep is the (or a most common) pathname separator ('/' or ':')
 
 # Programs that import and use 'os' stand a better chance of being
 # portable between different platforms.  Of course, they must then
@@ -20,6 +21,7 @@ try:
        name = 'posix'
        curdir = '.'
        pardir = '..'
+       sep = '/'
        import posixpath
        path = posixpath
        del posixpath
@@ -28,6 +30,7 @@ except ImportError:
        name = 'mac'
        curdir = ':'
        pardir = '::'
+       sep = ':'
        import macpath
        path = macpath
        del macpath