[Twisted-Python] Two thumbs up for inotify.py

Valentino Volonghi dialtone at gmail.com
Fri Dec 19 15:10:42 EST 2008

On Dec 19, 2008, at 11:38 AM, David Ripton wrote:

> To try inotify.py, I Twistified my code (easy because it was already
> event-driven PyGTK), then changed all the inotify calls to use the
> sandbox module's API rather than mine.  The only thing I disliked  
> about
> the API was having to pass the callbacks are to the watch method,  
> rather
> than the watch method returning a Deferred that I could addCallback  
> on,
> but that's just different, not actually hard or confusing.

That pisses me off too... The problem with the API you suggest is that  
a one shot API and you should keep adding those callbacks and call
watch which is not doable here... I'm open to suggestions to change it  
with a custom Protocol class (Which probably would fit better in Twisted
maybe but that's more cumbersome than adding the callbacks IMHO).

> Anyway, it works and my code is a bit smaller and cleaner than it was
> before and uses a tad less CPU.  I hope this ends up in a Twisted
> release.  I see #972 in the tracker, but it's been untouched for a
> long time.  Should I comment there?

You probably should (and also add me in the CC list), then I'll take
care of the reviews that will come in, I should also find the time to
setup a twisted branch with ampoule inside.

Valentino Volonghi aka Dialtone
Now running MacOS X 10.5
Home Page: http://www.twisted.it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20081219/bddc3792/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20081219/bddc3792/attachment.pgp 

More information about the Twisted-Python mailing list