定位安装了 a3s_code 的 venv Python
()
| 67 | |
| 68 | |
| 69 | def 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 | |
| 80 | def make_monitored_session(agent, workspace: str): |
no test coverage detected