Tool interface¶
Tool ¶
Base class for all tools. A tool is an executable that may require special handling to be executed properly.
format_command abstractmethod
¶
env_vars ¶
run ¶
Equivalent to SubprocessRunner.run
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |
capture ¶
Equivalent to SubprocessRunner.capture
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |
wait ¶
Equivalent to SubprocessRunner.wait
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |
exit_with ¶
Equivalent to SubprocessRunner.exit_with
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |
attach ¶
attach(command: list[str], **kwargs: Any) -> CompletedProcess
Equivalent to SubprocessRunner.attach
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |
redirect ¶
redirect(command: list[str], **kwargs: Any) -> CompletedProcess
Equivalent to SubprocessRunner.redirect
with the command
formatted by the tool's format_command
method and the environment variables set by the tool's env_vars
method (if any).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command | list[str] | The command to execute. | required |
Other Parameters:
Name | Type | Description |
---|---|---|
**kwargs | Any | Additional keyword arguments to pass to |