Код: Выделить всё
def check_output(command, console):
if console == True:
process = subprocess.Popen(command)
else:
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
output, error = process.communicate()
returncode = process.poll()
return returncode, output, error
for file in fileList.split(";"):
...code to create command string...
returncode, output, error = check_output(command, False)
if returncode != 0:
print("Process failed")
sys.exit()
C:\Path\to\executable.exe -i C:\path\to\input.ext -o C:\path\to\output.ext
Подробнее здесь: https://stackoverflow.com/questions/232 ... ython-loop
Мобильная версия