Re: Any idea to emulate tail -f

2009-05-05 Thread CTO
On May 5, 2:00 am, Joel Juvenal Rivera Rivera joel...@gmail.com wrote: 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

Re: Any idea to emulate tail -f

2009-05-05 Thread Lawrence D'Oliveiro
In message mailman.5091.1241503147.11746.python-l...@python.org, Joel Juvenal Rivera Rivera wrote: I want to make something very similar to the command tail -f (follow a file) ... http://codecodex.com/wiki/index.php?title=Monitoring_a_Log_File --

Re: Any idea to emulate tail -f

2009-05-05 Thread Iain King
On May 5, 7:00 am, Joel Juvenal Rivera Rivera joel...@gmail.com wrote: 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

Re: Any idea to emulate tail -f

2009-05-05 Thread Paul Scott
On Mon, 2009-05-04 at 23:50 -0700, CTO wrote: You might want to try http://pyinotify.sourceforge.net/. Works well on Linux systems. Otherwise, I'd watch the mtime on the file and fork to handle the change. pyinotify works really well. If you need to watch a file, simply use the IN_MODIFY

Re: Any idea to emulate tail -f

2009-05-05 Thread J Kenneth King
Iain King iaink...@gmail.com writes: On May 5, 7:00 am, Joel Juvenal Rivera Rivera joel...@gmail.com wrote: 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

Re: Any idea to emulate tail -f

2009-05-05 Thread norseman
Joel Juvenal Rivera Rivera wrote: 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

Any idea to emulate tail -f

2009-05-04 Thread Joel Juvenal Rivera Rivera
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 traffic. Regards