[Twisted-Python] deciding to use twisted or not

Alexandre Quessy listes at sourcelibre.com
Sun Sep 6 10:46:46 EDT 2009


Hi !
You might want to look at my implementation of a tail -F :
https://svn.sat.qc.ca/trac/miville/browser/trunk/py/miville/utils/tail.py
Let me know if you have better than that.
a

2009/9/1 Rob Hoadley <hoadley at gmail.com>:
> I've handled this problem 2 ways: 1) for almost realtime... using
> twisted and .read() file as glyph mentioned and 2) used splunk and
> it's functionality to send search "matching" data to a program that in
> turn does http notification.  This is at 5 min search intervals.
>
> As previous posters have mentioned, tail's behavior is inconsistent on
> different platforms.  If your OS platform never changes then you could
> use tail -f as a process protocol. I originally started doing my work
> using the process protocol and tail -f but needed the software to work
> on 3 versions of linux and os x.     The read() way of doing it was
> ultimately the most cross platform way I could come up with.  Good
> luck.
>
> -rob
>
>
> On Tue, Sep 1, 2009 at 8:20 AM, Martin-Louis Bright<mlbright at gmail.com> wrote:
>> PyInotify only allows you to detect file changes, leaving you with the task
>> of asynchronously sending http requests.
>>
>> -martin
>>
>> On Thu, Aug 27, 2009 at 12:19 PM, Mikhail <termim at gmail.com> wrote:
>>>
>>> Martin-Louis Bright <mlbright <at> gmail.com> writes:
>>>
>>> >
>>> >
>>> > I am using linux, and I want the daemon to be as responsive as possible
>>> > to log
>>> events, so I think I would rather have it sit on the same box as where the
>>> log
>>> is produced. (Perhaps I'm wrong about this?) So I'm going to try Cary's
>>> ProcessProtocol approach, and if that doesn't work, Glyph's LoopingCall
>>> with a
>>> read() approach.
>>> >
>>>
>>> You can also use pyinotify to watch your log file changes.
>>> http://trac.dbzteam.org/pyinotify
>>>
>>> Regards,
>>> Mikhail
>>>
>>>
>>>
>>> _______________________________________________
>>> Twisted-Python mailing list
>>> Twisted-Python at twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>> _______________________________________________
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
Alexandre Quessy
http://alexandre.quessy.net
http://www.puredata.info/Members/aalex



More information about the Twisted-Python mailing list