Tuesday, August 03, 2004

Global Signal Dispatching

Title: Global Signal Dispatching
Submitter: Patrick O'Brien (other recipes)
Last Updated: 2001/12/11
Version no: 1.3
From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/87056

This module, dispatcher.py, provides global signal dispatching services suitable for a wide variety of purposes, similar to Model-View-Controller or Model-View-Presenter patterns. This particular implementation allows a looser coupling than most Observer patterns. It also does transparent cleanup through the use of weak references and weak reference callbacks. This version defaults to using weak references, but provides an option to not use weak references for those cases where weak references are problematic (lambdas and such).

Source: Text Source