MCPcopy Index your code
hub / github.com/hyperopt/hyperopt / path_split_all

Function path_split_all

hyperopt/utils.py:218–226  ·  view source on GitHub ↗

split a path at all path separaters, return list of parts

(path)

Source from the content-addressed store, hash-verified

216
217
218def path_split_all(path):
219 """split a path at all path separaters, return list of parts"""
220 parts = []
221 while True:
222 path, fn = os.path.split(path)
223 if len(fn) == 0:
224 break
225 parts.append(fn)
226 return reversed(parts)
227
228
229def get_closest_dir(workdir):

Callers 2

test_path_split_allFunction · 0.90
get_closest_dirFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_path_split_allFunction · 0.72