trait_notifiers Module

Classes that implement and support the Traits change notification mechanism

Classes

class traits.trait_notifiers.NotificationExceptionHandlerState(handler, reraise_exceptions, locked)[source]
class traits.trait_notifiers.NotificationExceptionHandler[source]
class traits.trait_notifiers.StaticAnyTraitChangeNotifyWrapper(handler)[source]
class traits.trait_notifiers.StaticTraitChangeNotifyWrapper(handler)[source]
class traits.trait_notifiers.TraitChangeNotifyWrapper(handler, owner, target=None)[source]

Dynamic change notify wrapper.

This class is in charge to dispatch trait change events to dynamic listener, typically created using the on_trait_change method, or the decorator with the same name.

dispatch(handler, *args)[source]

Dispatch the event to the listener.

This method is normally the only one that needs to be overridden in a subclass to implement the subclass’s dispatch mechanism.

class traits.trait_notifiers.ExtendedTraitChangeNotifyWrapper(handler, owner, target=None)[source]

Change notify wrapper for “extended” trait change events..

The “extended notifiers” are set up internally when using extended traits, to add/remove traits listeners when one of the intermediate traits changes.

For example, in a listener for the extended trait a.b, we need to add/remove listeners to a:b when a changes.

class traits.trait_notifiers.FastUITraitChangeNotifyWrapper(handler, owner, target=None)[source]

Dynamic change notify wrapper, dispatching on the UI thread.

This class is in charge to dispatch trait change events to dynamic listener, typically created using the on_trait_change method and the dispatch parameter set to ‘ui’ or ‘fast_ui’.

class traits.trait_notifiers.NewTraitChangeNotifyWrapper(handler, owner, target=None)[source]

Dynamic change notify wrapper, dispatching on a new thread.

This class is in charge to dispatch trait change events to dynamic listener, typically created using the on_trait_change method and the dispatch parameter set to ‘new’.

Functions

traits.trait_notifiers.set_ui_handler(handler)[source]

Sets up the user interface thread handler.