Create an event.
An event is a dictionary, the only required field is the type.
Send events as messages.
| Parameters: |
|
|---|
You need to close() this after use.
Close the event dispatcher.
Send event.
| Parameters: |
|
|---|
Capture events.
| Parameters: |
|
|---|
handlers` is a dict of event types and their handlers, the special handler "*`" captures all events that doesn’t have a handler.
Open up a consumer capturing events.
This has to run in the main process, and it will never stop unless forced via KeyboardInterrupt or SystemExit.
Process the received event by dispatching it to the appropriate handler.