Source

pyohio_talk / tail_example.py

Full commit
import time, sys
from pysp.splunk_examples import SplunkExamples

eg = SplunkExamples()

def tail_n(number):
    tail = eg.tail_syslog(number=number)
    while True:
        try:
            print tail.next()
        except (StopIteration,KeyboardInterrupt):
            sys.exit('done')
	time.sleep(.2)

if __name__ == '__main__':
    tail_n(100)