Skip to content

Commit caa1b27

Browse files
committed
os.path: Implement dirname(), basename().
1 parent 0b53579 commit caa1b27

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

os.path/os/path.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def split(path):
2828
head = "/"
2929
return (head, r[1])
3030

31+
def dirname(path):
32+
return split(path)[0]
33+
34+
def basename(path):
35+
return split(path)[1]
36+
3137
def exists(path):
3238
return os.access(path, os.F_OK)
3339

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy