summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-08-07 20:17:55 (GMT)
committerGuido van Rossum <guido@python.org>1995-08-07 20:17:55 (GMT)
commit221df24940595eb9d99d598e39fd2967050bee11 (patch)
tree0f46cb4f4c0571824d40af6efc9d4c6f2e60e005
parent971ee13835e15801bfb6625674d3d5a0a663fb3d (diff)
downloadcpython-221df24940595eb9d99d598e39fd2967050bee11.zip
cpython-221df24940595eb9d99d598e39fd2967050bee11.tar.gz
cpython-221df24940595eb9d99d598e39fd2967050bee11.tar.bz2
add splitdrive()
-rw-r--r--Lib/posixpath.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 73e380c..05cc92a 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -74,6 +74,13 @@ def splitext(p):
return root, ext
+# Split a pathname into a drive specification and the rest of the
+# path. Useful on DOS/Windows/NT; on Unix, the drive is always empty.
+
+def splitdrive(p):
+ return '', p
+
+
# Return the tail (basename) part of a path.
def basename(p):