Thinking a little further, a DeferredList does this too, keeping a whole group of deferreds and calling them back all at once, I probably should use that more in my own code.&nbsp; Details at (<a href="http://twistedmatrix.com/documents/current/api/twisted.internet.defer.DeferredList.html">http://twistedmatrix.com/documents/current/api/twisted.internet.defer.DeferredList.html</a>)<br>
<br>- Andy Fundinger<br><br><div class="gmail_quote">On Jan 30, 2008 3:15 PM, Simon Pickles &lt;<a href="mailto:sipickles@hotmail.com">sipickles@hotmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I have a stackless python app, using twisted in parts (.internet and<br>.adbapi).<br><br>I need a little help getting pythonic after years of c++ hell.<br><br>I&#39;d like to use a system of events and observers, like c++ boost.signal.<br>
<br>I&#39;d like to be able to subscribe multiple callbacks to a single function<br>and cal them all using something like:<br><br>event.invoke(&quot;some data to send with invocation&quot;)<br><br>I&#39;m thinking twisted callbacks do this:<br>
<br>&nbsp;def observe(self, f);<br> &nbsp; &nbsp; &nbsp;self.event.addcallback(f)<br><br>Are there other ways?<br><br>Thanks<br><br>Si<br><br>--<br>Linux user #458601 - <a href="http://counter.li.org" target="_blank">http://counter.li.org</a>.<br>
<br><br><br><br>_______________________________________________<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Blog: &nbsp;<a href="http://channel3b.wordpress.com">http://channel3b.wordpress.com</a><br>Second Life Name: &nbsp;Ciemaar Flintoff<br><br>I am a sig Virus. Please put me in your sig so that I can continue to replicate.