MCPcopy Create free account
hub / github.com/openai/openai-agents-python / build_command_path

Function build_command_path

examples/run_examples.py:206–217  ·  view source on GitHub ↗
(base_path: str | None = None)

Source from the content-addressed store, hash-verified

204
205
206def build_command_path(base_path: str | None = None) -> str:
207 candidates: list[str] = []
208 if base_path is None:
209 base_path = os.environ.get("PATH", "")
210 candidates.extend(split_path_entries(base_path))
211
212 shell_path = interactive_shell_path()
213 if shell_path:
214 candidates.extend(split_path_entries(shell_path))
215
216 candidates.extend(str(path) for path in COMMON_PATH_HINTS)
217 return os.pathsep.join(dedupe_existing_paths(candidates))
218
219
220def build_python_path(base_path: str | None = None) -> str:

Callers 1

run_examplesFunction · 0.85

Calls 4

split_path_entriesFunction · 0.85
interactive_shell_pathFunction · 0.85
dedupe_existing_pathsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected