I have a log file being written by another process which I want to watch for changes. Each time a change occurs I\'d like to read the new data in to do some processing on it
The best and simplest solution is to use pygtail: https://pypi.python.org/pypi/pygtail
from pygtail import Pygtail import sys while True: for line in Pygtail("some.log"): sys.stdout.write(line)