Any idea to emulate tail -f
J Kenneth King
james at agentultra.com
Tue May 5 18:18:00 CEST 2009
Iain King <iainking at gmail.com> writes:
> On May 5, 7:00 am, Joel Juvenal Rivera Rivera <joel... at gmail.com>
>> I want to make something very similar to the command tail -f (follow a
>> file), i have been trying with some while True and some microsleeps
>> (about .1 s); did someone has already done something like this?
>> And about the file is the apache acceslog of a site with a lot of
>> joe / Joel Rivera
> This is very interesting, about using Generator Expressions:
> Relevant stuff about 'tail -f' is on page 39, but I'd read the whole
> thing if you can.
I second this suggestion. I've used this method in many scripts of
late and it is quite handy.
He even takes it a little further and shows you some neat things you
can do with it later on.
More information about the Python-list