Inheritance diagram for IPython.kernel.core.notification:
The IPython Core Notification Center.
See docs/source/development/notification_blueprint.txt for an overview of the notification module.
Bases: object
Synchronous notification center
Examples
>>> import IPython.kernel.core.notification as notification
>>> def callback(theType, theSender, args={}):
... print theType,theSender,args
...
>>> notification.sharedCenter.add_observer(callback, 'NOTIFICATION_TYPE', None)
>>> notification.sharedCenter.post_notification('NOTIFICATION_TYPE', object()) # doctest:+ELLIPSIS
NOTIFICATION_TYPE ...
Add an observer callback to this notification center.
The given callback will be called upon posting of notifications of the given type/sender and will receive any additional kwargs passed to post_notification.
Parameters: | observerCallback : callable
theType : hashable
sender : hashable
|
---|
Post notification (type,sender,**kwargs) to all registered observers.
Implementation notes: