SubprocessInterpreter
- require_confirm (bool, optional): If True, prompt user before running code strings for security. (default: :obj:
True
) - print_stdout (bool, optional): If True, print the standard output of the executed code. (default: :obj:
False
) - print_stderr (bool, optional): If True, print the standard error of the executed code. (default: :obj:
True
) - execution_timeout (int, optional): Maximum time in seconds to wait for code execution to complete. (default: :obj:
60
)
init
run_file
- file (Path): The path object of the file to run.
- code_type (str): The type of code to execute (e.g., ‘python’, ‘bash’). (default: obj:
python
)
run
- code (str): The code string to execute.
- code_type (str): The type of code to execute (e.g., ‘python’, ‘bash’).
_create_temp_file
- code (str): The code to write to the temporary file.
- extension (str): The file extension to use.
_check_code_type
supported_code_types
update_action_space
_is_command_available
- command (str): The command to check.
execute_command
- command (str): The shell command to execute.