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 it's
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 even
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
http://www.adroll.com

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to