Subprocess Print Logs

[Solved] Subprocess Print Logs | Swift - Code Explorer | yomemimo.com
Question : subprocess print logs

Answered by : systemsplit

from subprocess import Popen, PIPE, STDOUT
command = "shell command with arguments"
process = Popen(command, shell=True, stdout=PIPE, stderr=STDOUT)
with process.stdout: for line in iter(process.stdout.readline, b''): print(line.decode("utf-8").strip())

Source : | Last Update : Mon, 29 Nov 21

Answers related to subprocess print logs

Code Explorer Popular Question For Swift