summaryrefslogtreecommitdiffstats
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index fb3b6a6..36edc80 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -367,3 +367,10 @@ def normpath(path):
if not comps and not slashes:
comps.append('.')
return slashes + string.joinfields(comps, '/')
+
+
+# Return an absolute path.
+def abspath(path):
+ if not isabs(path):
+ path = join(os.getcwd(), path)
+ return normpath(path)