Events Utility API

glashammer.utils.events

copyright:2007-2009-2008 by Armin Ronacher
license:MIT
class glashammer.utils.events.EventManager(app)

Helper class that handles event listeners and event emitting.

This is not a public interface. Always use the emit_event or iter_listeners functions to access it or the connect_event or disconnect_event methods on the application.

connect(event, callback, position='after')
Connect a callback to an event.
iter(event)
Return an iterator for all listeners of a given name.
template_emit(event, *args, **kwargs)
Emits events for the template context.
class glashammer.utils.events.TemplateEventResult(items)
A list subclass for results returned by the event listener that concatenates the results if converted to string, otherwise it works exactly like any other list.
glashammer.utils.events.emit_event(event, *args, **kwargs)
Emit an event and return an EventResult instance.