MCPcopy Index your code
hub / github.com/AI45Lab/Code / find_venv_python

Function find_venv_python

examples/test_ahp_agent_monitors_agent.py:69–77  ·  view source on GitHub ↗

定位安装了 a3s_code 的 venv Python

()

Source from the content-addressed store, hash-verified

67
68
69def find_venv_python() -> str:
70 """定位安装了 a3s_code 的 venv Python"""
71 examples_dir = Path(__file__).parent
72 sdk_root = examples_dir.parent / "sdk" / "python"
73 venv_py = sdk_root / ".venv" / "bin" / "python3"
74 if venv_py.exists():
75 return str(venv_py)
76 # 回退:运行此脚本的解释器
77 return sys.executable
78
79
80def make_monitored_session(agent, workspace: str):

Callers 1

make_monitored_sessionFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected