qtoolkit.host.base module#
- class qtoolkit.host.base.BaseHost(config: HostConfig | None = None)[source]#
Bases:
QTKObjectBase Host class.
- abstractmethod execute(command: str | list[str], workdir: str | Path | None = None) tuple[str, str, int][source]#
Execute the given command on the host.
- Parameters:
command (str or list of str) – Command to execute, as a str or list of str
workdir (str or None) – path where the command will be executed.
- Returns:
Standard output, standard error, and exit code of the command.
- Return type:
tuple[str, str, int]