diff options
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index ca7f3d1..6bab89d 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -365,3 +365,10 @@ def normpath(path): if not prefix and not comps: comps.append('.') return prefix + string.joinfields(comps, os.sep) + + +# Return an absolute path. +def abspath(path): + if not isabs(path): + path = join(os.getcwd(), path) + return normpath(path) |