Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/billryan/algorithm-exercise
/ mkdir_p
Function
mkdir_p
scripts/util.py:7–14 ·
view source on GitHub ↗
(path)
Source
from the content-addressed store, hash-verified
5
import
errno
6
7
def
mkdir_p(path):
8
try
:
9
os.makedirs(path)
10
except
OSError
as
exc:
# Python >2.5
11
if
exc.errno == errno.EEXIST and os.path.isdir(path):
12
pass
13
else
:
14
raise
15
16
17
def
par_dir(path):
Callers
1
main.py
File · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected