Python tail is a simple implementation of GNU tail --follow=name.
FollowName is a simple implementation of GNU tail –follow=name
It provides an Iterator generator followname that returns lines as data is added to the file.
If the file is truncated or replaced followname will open the new file.
followname only requires read access to the file.
followname - read lines as a file grows
It also comes with followname, a command line version offering the same functionality as GNU tail –follow=name.
Install with pip or easy_install.
pip install followname
import followname follower = FollowName("testfile.txt") for line in follower.follow(open('test.txt')): print line
## Running Tests
FollowName currently only has doctests.
Run tests with nose:
nosetests --with-doctest src/followname
Run tests with doctest:
python -m doctest -v src/followname/__init__.py
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.