Код: Выделить всё
proc = subprocess.Popen(
cmd,
stderr=subprocess.STDOUT, # Merge stdout and stderr
stdout=subprocess.PIPE,
shell=True)
Код: Выделить всё
communicateКод: Выделить всё
stdoutdata, stderrdata = proc.communicate()
Каков самый простой способ реализовать тайм-ауты в программе Python, предназначенной для работы в Windows и Linux?
Подробнее здесь: https://stackoverflow.com/questions/119 ... th-timeout
Мобильная версия