embutils.utils.events module
Event handling utilities.
- date
2021
- author
Christian Wiche
- contact
- license
The MIT License (MIT)
- class embutils.utils.events.EventHook[source]
Bases:
objectSimple event hook implementation. This utility allows emitting events to several callbacks in a simple fashion.
Note
All the callbacks subscribed to a hook need to handle the same arguments.
This class don’t require any input from the user to be initialized.
- emit(*args, **kwargs) None[source]
Emit the given arguments to all the callbacks.
- Parameters
args – Arguments.
kwargs – Key arguments.
- property empty: bool
Returns if the event hook has callbacks subscribed.