MCPcopy Create free account
hub / github.com/Image-Py/imagepy / getpath

Function getpath

imagepy/core/loader/loader.py:13–19  ·  view source on GitHub ↗
(root, path)

Source from the content-addressed store, hash-verified

11from codecs import open
12
13def getpath(root, path):
14 for i in range(10,0,-1):
15 if not '../'*i in path: continue
16 s = root
17 for j in range(i):s=os.path.dirname(s)
18 path = path.replace('../'*i, s+'/')
19 return path.replace('\\\\','\\').replace('\\','/')
20
21def extend_plugins(path, lst, err):
22 rst = []

Callers 2

extend_pluginsFunction · 0.70
extend_toolsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected