Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 877 Bytes

README.rst

File metadata and controls

26 lines (20 loc) · 877 Bytes

SimpleEvent

A simple python event notification system

https://travis-ci.org/kampka/python-simpleevent.svg?branch=master

This module provides a simple event notification system. An object that wishes to be notified about an event can register a callback function with the EventManager. Whenever an Event is emitted though that EventManager, the object will be notified by calling the registered callback methods for all callbacks registered for that event.

Example::
>>> em = EventManager()
>>> def receiver(notification):
...     print notification
>>> em.registerHandler("notify", receiver)
>>> result = em.emit(Event("notify", "Hello event notification"))
Hello event notification