qtoolkit.host.base module#
- class qtoolkit.host.base.BaseHost(config: HostConfig | None = None)[source]#
Bases:
QTKObject
Base Host class.
- abstract execute(command: str | list[str], workdir: str | Path | None = None)[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.
stdin (None, PIPE or file-like) – Standard input, /dev/null if None
stdout (None, PIPE or file-like) – Standard output, /dev/null if None
stderr (None, PIPE, DEVNULL or file-like) – Standard error, same as stdout if None
- Returns:
Local process object associated to the connection, if dryrun is False, else None
- Return type:
subprocess.Popen
object or None