On Sun, Nov 22, 2009 at 03:43 +0100, Ivan Voras wrote:
> I'm trying to simply imitate what "tail -f" does, i.e. read a file, wait
> until it's appended to and process the new data, but apparently I'm
> missing something.
[..]
> Any advice?

Have a look at [1], which mimics "tail -f" perfectly. It comes from a
talk by David Beazley on generators which you can find at [2] and
[3].

Enjoy!

[1] http://www.dabeaz.com/generators/follow.py
[2] http://www.dabeaz.com/generators-uk/
[3] http://www.dabeaz.com/coroutines/

-- 
  .''`.     Wolodja Wentland    <wentl...@cl.uni-heidelberg.de> 
 : :'  :    
 `. `'`     4096R/CAF14EFC 
   `-       081C B7CD FF04 2BA9 94EA  36B2 8B7F 7D30 CAF1 4EFC

Attachment: signature.asc
Description: Digital signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to