Skip to content
Unix tail follow implementation in python

python-tail - Unix tail follow implementation in Python


python install

Basic Usage

import tail

# Create a tail instance
t = tail.Tail('file-to-be-followed')

# Register a callback function to be called when a new line is found in the followed file. 
# If no callback function is registerd, new lines would be printed to standard out.

# Follow the file with 5 seconds as sleep time between iterations. 
# If sleep time is not provided 1 second is used as the default time.
Something went wrong with that request. Please try again.