Skip to content

Tool: run_python_command

Description: Tool to execute Python code in a subprocess and capture output.

Argument Type Description
code str The Python code to execute.
timeout int, optional Timeout in seconds for the command. Defaults to 60.
require_confirmation bool, optional If True, require user confirmation before running. Defaults to False.
interactive bool, optional If True, warns that the command may require user interaction. Defaults to False.
Returns str File paths and line counts for stdout and stderr, or direct output if small enough, or warning if code is empty.

Example usage: run_python_command(code="print('Hello')", timeout=10)


generated by janito.dev