summaryrefslogtreecommitdiffstats
path: root/Lib/macpath.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/macpath.py')
-rw-r--r--Lib/macpath.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 47f695a..b5c17f0 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -46,6 +46,12 @@ def split(s):
return s[:colon], s[colon:]
+# Short interfaces to split()
+
+def dirname(s): return split(s)[0]
+def basename(s): return split(s)[1]
+
+
# XXX This is undocumented and may go away!
# Normalize a pathname: get rid of '::' sequences by backing up,
# e.g., 'foo:bar::bletch' becomes 'foo:bletch'.
@@ -112,3 +118,9 @@ def exists(s):
except mac.error:
return 0
return 1
+
+
+# Normalize path, removing things like ...:A:..:... (yet to be written)
+
+def normpath(s):
+ return s