[Twisted-Python] Implementing an event manager in twisted

Jean-Paul Calderone exarkun at divmod.com
Thu Apr 12 11:06:13 MDT 2007


On Thu, 12 Apr 2007 09:40:24 -0700, Manuel Arias <manuel.arias at gmail.com> wrote:
>Hi Justin,
>
>The scheduling is easily doable using twisted as a scheduler eg) callLater
>or task.LoopingCall.
>
>Writing an event dispatcher isn't too tough either. A very simple one allows
>you to register using a hash-able "name" object eg) a string. You call the
>dispatcher with the same object when you want to notify the registered
>handlers. Twisted has one see:
>http://twistedmatrix.com/docum<http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html>
>ents/current/api/twisted.python<http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html>
>.dispatch.EventDispatcher.html<http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html>.

Note that this is deprecated and new software should not use it.  Feel free
to copy it into your own project if you think it's useful, but it hardly does
anything at all.

Jean-Paul




More information about the Twisted-Python mailing list