You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
357 B
Python
22 lines
357 B
Python
1 year ago
|
import subprocess
|
||
|
from typing import (
|
||
|
IO,
|
||
|
Optional,
|
||
|
Sequence,
|
||
|
)
|
||
|
|
||
|
|
||
|
def call(
|
||
|
args: Sequence[str],
|
||
|
check: bool = True,
|
||
|
stdin: Optional[IO] = None,
|
||
|
) -> subprocess.CompletedProcess:
|
||
|
proc = subprocess.run(
|
||
|
args,
|
||
|
capture_output=True,
|
||
|
check=check,
|
||
|
text=True,
|
||
|
stdin=stdin,
|
||
|
)
|
||
|
return proc
|