MCPcopy Create free account
hub / github.com/ScaleML/AgentSPEX / wrap_python_as_bash

Function wrap_python_as_bash

src/harness/parsing/inline_tools.py:15–17  ·  view source on GitHub ↗

Wrap a Python code block as a bash heredoc so it can be executed via shell_run.

(code: str)

Source from the content-addressed store, hash-verified

13
14
15def wrap_python_as_bash(code: str) -> str:
16 """Wrap a Python code block as a bash heredoc so it can be executed via shell_run."""
17 return f"python3 << '__PYEOF__'\n{code}\n__PYEOF__"
18
19
20@dataclass

Callers 2

_extract_inline_callsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected