我正在尝试搜索变量的输出以查找特定单词,如果为True,则触发响应。
我肯定我错过了什么重要的东西,但我就是想不出来是什么。
感谢您提前纠正。
variable = subprocess.call(["some", "command", "here"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for word in variable:
if word == "myword":
print "something something"
我肯定我错过了什么重要的东西,但我就是想不出来是什么。
感谢您提前纠正。