Subprocess with 'watch' command

Viewed 1731

Is it possible to get the watch command in shell to work with subprocess?

tail = subprocess.Popen("watch -n 1 'tail -n 1 /mnt/syslog/**/*.log | grep :'", shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)

Because it doesn't work for me...

1 Answers
Related