Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ dirname
Function
dirname
Lib/ntpath.py:261–263 ·
view source on GitHub ↗
Returns the directory component of a pathname
(p)
Source
from the content-addressed store, hash-verified
259
# Return the head (dirname) part of a path.
260
261
def
dirname(p):
262
""
"Returns the directory component of a pathname"
""
263
return
split(p)[0]
264
265
266
# Is a path a mount point?
Callers
4
openfile
Function · 0.90
expanduser
Function · 0.70
_readlink_deep
Function · 0.70
get_pydoc_link
Function · 0.50
Calls
1
split
Function · 0.70
Tested by
2
openfile
Function · 0.72
get_pydoc_link
Function · 0.40