subprocess.Popen获取子程序输出

new_child = subprocess.Popen([self.manage, worker], stderr=subprocess.PIPE)
for line in iter(new_child.stderr.readline, ''):
    logger.debug(line)

你可能感兴趣的:(Python,python,subprocess)