From 9bb985450def9aa77da1814eb32e19e12eee5cb4 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Fri, 10 Jan 2003 23:47:53 +0000 Subject: [PATCH] Backport for SF # 659228, 'realpath' function missing from os.path --- Lib/dospath.py | 2 +- Lib/macpath.py | 3 ++- Lib/ntpath.py | 3 ++- Lib/posixpath.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Lib/dospath.py b/Lib/dospath.py index 652b35f51f92..8657d330588f 100644 --- a/Lib/dospath.py +++ b/Lib/dospath.py @@ -6,7 +6,7 @@ import stat __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","islink","exists","isdir","isfile","ismount", - "walk","expanduser","expandvars","normpath","abspath"] + "walk","expanduser","expandvars","normpath","abspath","realpath"] def normcase(s): """Normalize the case of a pathname. diff --git a/Lib/macpath.py b/Lib/macpath.py index f8ca05165ac9..bb0a85018cb2 100644 --- a/Lib/macpath.py +++ b/Lib/macpath.py @@ -6,7 +6,8 @@ from stat import * __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","islink","exists","isdir","isfile", - "walk","expanduser","expandvars","normpath","abspath"] + "walk","expanduser","expandvars","normpath","abspath", + "realpath","supports_unicode_filenames"] # Normalize the case of a pathname. Dummy in Posix, but .lower() here. diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 5a63105d080b..f4f551011d27 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -11,7 +11,8 @@ import stat __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","islink","exists","isdir","isfile","ismount", - "walk","expanduser","expandvars","normpath","abspath","splitunc"] + "walk","expanduser","expandvars","normpath","abspath","splitunc", + "realpath","supports_unicode_filenames"] # Normalize the case of a pathname and map slashes to backslashes. # Other normalizations (such as optimizing '../' away) are not done diff --git a/Lib/posixpath.py b/Lib/posixpath.py index 81358cae377b..b68fa6125a81 100644 --- a/Lib/posixpath.py +++ b/Lib/posixpath.py @@ -17,7 +17,7 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext", "basename","dirname","commonprefix","getsize","getmtime", "getatime","islink","exists","isdir","isfile","ismount", "walk","expanduser","expandvars","normpath","abspath", - "samefile","sameopenfile","samestat"] + "samefile","sameopenfile","samestat","realpath"] # Normalize the case of a pathname. Trivial in Posix, string.lower on Mac. # On MS-DOS this may also turn slashes into backslashes; however, other -- 2.47.3