I'm trying to search through a variable's output to find a specific word, then have that trigger a response if True.
variable = subprocess.call(["some", "command", "here"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
for word in variable:
if word == "myword":
print "something something"
I'm sure I'm missing something big here, but I just can't figure out what it is.
Thanks in advance for setting me straight.