Package Pyblio :: Module Callback :: Class Publisher
[hide private]
[frames] | no frames]

Class Publisher

source code

object --+
         |
        Publisher
Known Subclasses:
Stores.resultset.ResultSet, Stores.resultset.View, Stores.filestore.Database, Stores.filestore.RODict, Stores.bsddbstore.Database, Stores.bsddbstore.RSDB, Parsers.Syntax.Tagged.Reader

Base class for objects that wish to emit signals to registered clients.

Instance Methods [hide private]
 
__init__(self)
Intialize the publisher
source code
 
emit(self, signal, *args)
Call this method to emit a signal.
source code
 
register(self, signal, callback, *args)
Clients interested in a given signal must register with this method.
source code
 
unregister(self, signal, callback)
Stop notifying events for the specified signal/callback pair.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Intialize the publisher
Overrides: object.__init__

emit(self, signal, *args)

source code 
Call this method to emit a signal. Registered client will have their callbacks automatically invoked, with the specified arguments

register(self, signal, callback, *args)

source code 
Clients interested in a given signal must register with this method. The optional args are passed as the last arguments (after the emit arguments) to the callback.