MCPcopy Create free account
hub / github.com/BabitMF/bmf / find_in_python_root

Function find_in_python_root

bmf/cmd/python_wrapper/wrapper.py:12–23  ·  view source on GitHub ↗
(filepath: str)

Source from the content-addressed store, hash-verified

10
11
12def find_in_python_root(filepath: str):
13 filefullpath = ""
14 found = False
15 for package_root in site.getsitepackages():
16 # Find the path of the real executable.
17 filefullpath = os.path.join(package_root, filepath)
18
19 if os.path.exists(filefullpath):
20 found = True
21 return found, filefullpath
22
23 return found, ""
24
25
26def exec_cmd(cmd: str, args):

Callers 2

exec_cmdFunction · 0.85
bmf_envFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected