Function event_ctx*args, source=None, trigger_args=None, lo_observe=False)[source]

Event context manager.

This manager adds and removes events.

  • args (EventArg, Tuple[str, EventCallback], optional) – One or more EventArgs to add.

  • source (Any, optional) – Source can be class or any object.

  • trigger_args (GenericArgs, optional) – Args that are passed to events when they are triggered.

  • lo_observe (bool) –


Generator[EventObserver, None, None] – events

Return type:

Generator[EventObserver, None, None]