embutils.utils.subprocess module
Subprocess execution utilities.
- date
2021
- author
Christian Wiche
- contact
- license
The MIT License (MIT)
- embutils.utils.subprocess.execute(cmd: str, cwd: Optional[Union[bytes, bytearray, str, pathlib.Path]] = None, log: Optional[Union[bytes, bytearray, str, pathlib.Path]] = None, pipe: bool = True, **kwargs) subprocess.CompletedProcess[source]
Execute the given command as a subprocess.
- Parameters
cmd (TPPath) – Command to be executed.
cwd (TPPath) – Command working directory.
log (TPPath) – File to store the execution logs.
pipe (bool) – Enable pipe output to terminal.
- Returns
Execution results.
- Return type
sp.CompletedProcess