Package gavo :: Package base :: Module observer :: Class ObserverBase
[frames] | no frames]

Class ObserverBase

source code

object --+
         |
        ObserverBase
Known Subclasses:

is a base class for observers.

Observers have methods listening to certain events. Use the listen decorator above to make the connections. The actual event subscriptions are done in the constructor.

The signature of the listeners always is:

 listener(dispatcher, arg) -> ignored

dispatcher is the EventDispatcher instance propagating the event. It has lots of useful attributes explained in base.event's notifyXXX docstrings.

You can listen to anything that has a notify method in the EventDispatcher.

Instance Methods
 
__init__(self, dispatcher)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, dispatcher)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)