mirror of
https://codeberg.org/privacy1st/subprocess-util
synced 2024-12-22 22:06:05 +01:00
11 lines
280 B
Python
11 lines
280 B
Python
import subprocess
|
|
|
|
|
|
def execute_capture(command: list[str]) -> [int, str, str]:
|
|
completed: subprocess.CompletedProcess = subprocess.run(
|
|
command,
|
|
capture_output=True,
|
|
text=True,
|
|
)
|
|
return completed.returncode, completed.stdout, completed.stderr
|