In fact, I think as far as checking goes, we just care that there's at least one line of output containing more than one word.  I don't think it's even necessary to check each line, I think you can just run the regex against the whole string all at once.  So maybe this function can be very simple, like <code>return bool(re.match(r"^.+\w+.+$",output.strip()))</code>.