【发布时间】:2012-03-29 19:37:46
【问题描述】:
我可以使用以下命令打印subprocess.popen 的输出:
output = file.stdout.read()
print output
我正在寻找有关如何遍历输出的每个样例以查找单词 FontCache 的每个实例并将其发送到文件的示例。我不知道我是否需要 for 循环或 if 语句。我将不胜感激朝着正确的方向前进。一些示例的链接会很棒。
【问题讨论】:
标签: python iteration stdout popen