[Twisted-Python] Looking for a simple file event driven loop using Twisted

Tommi Virtanen tv at twistedmatrix.com
Fri Mar 25 14:12:43 EST 2005

steven howe wrote:
> Hello,
> I'm looking for some example code I can use to build an app from. I
> need to 'wait' or sleep for new data in a file. Then wake and process
> the data.
 > The file is a regular file, not a pipe. It is the output of a existing

As far as I remember off-hand, the "tail -f" trick is this: every once
in a while (use LoopingCall or reactor.callLater), read until eof, and
do f.seek(0, 1) to reset the EOF.

 > program (i.e., not mine to modify). Needless to say, the API for hugh.


More information about the Twisted-Python mailing list