Skip to content

kampka/python-simpleevent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple python event notification system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages