Imitating "tail -f"
paul.nospam at rudin.co.uk
Sun Nov 22 13:20:45 CET 2009
Matt Nordhoff <mnordhoff at mattnordhoff.com> writes:
> Jason Sewall wrote:
>> FWIW, GNU tail on Linux uses inotify for tail -f:
>> The wikipedia page for inotify lists several python bindings:
>> Not much help for non-Linux users, but there it is. Too bad, because
>> inotify is pretty cool.
> Some other operating systems have similar facilities, e.g. FSEvents on OS X.
Yeah, and there's a similar kind of thing in the windows api.
A nice python project would be a cross-platform solution that presented
a uniform api and just did the right thing behind the scenes on each OS.
(Incidentally on linux you need to watch out for the value of
/proc/sys/fs/inotify/max_user_watches - if you're using inotify in anger
it's easy to exceed the default set by a lot of distributions.)
More information about the Python-list