call external program in python, watch output for specific text then take action

Posted by bleomycin on Stack Overflow See other posts from Stack Overflow or by bleomycin
Published on 2010-05-19T09:32:12Z Indexed on 2010/05/19 9:40 UTC
Read the original article Hit count: 187

Filed under:
|
|

Hello everyone, i'm looking for a way in python to run an external binary and watch it's output for: "up to date" If "up to date" isn't returned i want to run the original command again, once "up to date" is displayed i would like to be able to run another script. So far I've figured out how to run the binary with options using subprocess but thats as far as I've gotten. Thanks!

© Stack Overflow or respective owner

Related posts about python

Related posts about linux