Consider the following Python script :
import time f = open(\'data.txt\') while True : line = next(f) if line : print(line) time.sleep(1)