__init__

BetterEvent.__init__(wait_on: str = 'set', name: str = None, default: bool = False, notify_set=True, notify_clear=True)[source]
Parameters
  • wait_onset (default) - wait() triggers when event is “set”. clear - wait() triggers when event is “clear”. both - wait() triggers when the event state flips from “set” to “clear” or vice versa.

  • name (str) – An optional name to identify this event

  • default – The default state of the event. Either False for “clear”, or True for “set”

  • notify_set – Whether to notify state listeners wait() wait_set() wait_clear() when set() is called and the state changes from “clear” to “set”

  • notify_clear – Whether to notify state listeners wait() wait_set() wait_clear() when clear() is called and the state changes from “set” to “clear”