dbs
This commit is contained in:
parent
5112761af5
commit
e11b92e57b
4 changed files with 22 additions and 29 deletions
|
@ -17,12 +17,12 @@ def run(*tuples) -> subprocess.CompletedProcess:
|
|||
return subprocess.run(get_tuples_args(tuples), capture_output=False)
|
||||
|
||||
|
||||
def run_line(*tuples, charset:str = txt.CHARSET) -> str:
|
||||
def run_line(*tuples, charset: str = txt.CHARSET) -> str:
|
||||
lines = run_lines(*get_tuples_args(tuples), charset=charset)
|
||||
return lines[0]
|
||||
|
||||
|
||||
def run_lines(*tuples, charset:str = txt.CHARSET) -> list[str]:
|
||||
def run_lines(*tuples, charset: str = txt.CHARSET) -> list[str]:
|
||||
process = subprocess.run(get_tuples_args(tuples), capture_output=True)
|
||||
string = process.stdout.decode(charset)
|
||||
return string.rstrip().splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue