diff options
author | Skip Montanaro <skip@pobox.com> | 2003-02-14 19:35:31 +0000 |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2003-02-14 19:35:31 +0000 |
commit | 117910dc445a2262bd96bbfefaf43714ae59c11b (patch) | |
tree | 9dfb082f3e2975d50277035df0c3e8db70dbce7b /Lib/ntpath.py | |
parent | 4507ec70cff35468f4b1767382f38ecebd4a29a2 (diff) | |
download | cpython-git-117910dc445a2262bd96bbfefaf43714ae59c11b.tar.gz |
Migrate definitions of several platform-dependent path-related variables
into the relevant path modules. See patch #686397.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index b82051424e..e39266bf21 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -13,8 +13,24 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","getctime", "islink","exists","isdir","isfile","ismount", "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 +curdir = '.' +pardir = '..' +extsep = '.' +sep = '\\' +pathsep = ';' +altsep = None +if 'ce' in sys.builtin_module_names: + defpath = '\\Windows' +elif 'os2' in sys.builtin_module_names: + # OS/2 w/ EMX + altsep = '/' +else: + defpath = '.;C:\\bin' + # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done # (this is done by normpath). |