MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / add_to_path

Function add_to_path

pywebio/platform/path_deploy.py:83–89  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

81
82 @contextmanager
83 def add_to_path(p):
84 import sys
85 sys.path.append(p)
86 try:
87 yield
88 finally:
89 sys.path.remove(p)
90
91 if not reload and path in _cached_modules:
92 return _cached_modules[path]

Callers 1

_get_moduleFunction · 0.85

Calls 2

appendMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…