[Twisted-Python] Events in Python
Simon Pickles
sipickles at hotmail.com
Wed Jan 30 16:18:39 EST 2008
Ah yes, deferredLists. thanks for the tip
Si
Andy Fundinger wrote:
> 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. Details at
> (http://twistedmatrix.com/documents/current/api/twisted.internet.defer.DeferredList.html)
>
> - Andy Fundinger
>
> On Jan 30, 2008 3:15 PM, Simon Pickles <sipickles at hotmail.com
> <mailto:sipickles at hotmail.com>> wrote:
>
> Hi,
>
> I have a stackless python app, using twisted in parts (.internet and
> .adbapi).
>
> I need a little help getting pythonic after years of c++ hell.
>
> I'd like to use a system of events and observers, like c++
> boost.signal.
>
> I'd like to be able to subscribe multiple callbacks to a single
> function
> and cal them all using something like:
>
> event.invoke("some data to send with invocation")
>
> I'm thinking twisted callbacks do this:
>
> def observe(self, f);
> self.event.addcallback(f)
>
> Are there other ways?
>
> Thanks
>
> Si
>
> --
> Linux user #458601 - http://counter.li.org.
>
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> <mailto:Twisted-Python at twistedmatrix.com>
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
>
>
> --
> Blog: http://channel3b.wordpress.com
> Second Life Name: Ciemaar Flintoff
>
> I am a sig Virus. Please put me in your sig so that I can continue to
> replicate.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
More information about the Twisted-Python
mailing list