mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Migrate definitions of several platform-dependent path-related variables
into the relevant path modules. See patch #686397.
This commit is contained in:
parent
4507ec70cf
commit
117910dc44
7 changed files with 77 additions and 57 deletions
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue