Wrap a Python code block as a bash heredoc so it can be executed via shell_run.
(code: str)
| 13 | |
| 14 | |
| 15 | def 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 |
no outgoing calls
no test coverage detected