<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 19, 2008, at 11:38 AM, David Ripton wrote:</div><div><br></div><blockquote type="cite"><div>To try inotify.py, I Twistified my code (easy because it was already<br>event-driven PyGTK), then changed all the inotify calls to use the<br>sandbox module's API rather than mine. &nbsp;The only thing I disliked about<br>the API was having to pass the callbacks are to the watch method, rather<br>than the watch method returning a Deferred that I could addCallback on,<br>but that's just different, not actually hard or confusing.<br></div></blockquote><div><br></div><div>That pisses me off too... The problem with the API you suggest is that it's</div><div>a one shot API and you should keep adding those callbacks and call</div><div>watch which is not doable here... I'm open to suggestions to change it even</div><div>with a custom Protocol class (Which probably would fit better in Twisted</div><div>maybe but that's more cumbersome than adding the callbacks IMHO).</div><br><blockquote type="cite"><div>Anyway, it works and my code is a bit smaller and cleaner than it was<br>before and uses a tad less CPU. &nbsp;I hope this ends up in a Twisted<br>release. &nbsp;I see #972 in the tracker, but it's been untouched for a<br>long time. &nbsp;Should I comment there?<br></div></blockquote></div><div><br></div><div>You probably should (and also add me in the CC list), then I'll take</div><div>care of the reviews that will come in,&nbsp;I should also find the time to</div><div>setup a twisted branch with ampoule inside.</div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">-- </span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Valentino Volonghi aka Dialtone</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Now&nbsp;running MacOS X 10.5</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Home Page: <a href="http://www.twisted.it">http://www.twisted.it</a> </span></div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial; font-size: 13px; white-space: pre-wrap; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><a href="http://www.adroll.com">http://www.adroll.com</a></span></div></div></div></span></div></span></div></span> </div><br></body></html>