A very simple publish/subscribe system.
def pip._vendor.distlib.util.EventMixin.__init__ |
( |
|
self | ) |
|
def pip._vendor.distlib.util.EventMixin.add |
( |
|
self, |
|
|
|
event, |
|
|
|
subscriber, |
|
|
|
append = True |
|
) |
| |
Add a subscriber for an event.
:param event: The name of an event.
:param subscriber: The subscriber to be added (and called when the
event is published).
:param append: Whether to append or prepend the subscriber to an
existing subscriber list for the event.
def pip._vendor.distlib.util.EventMixin.get_subscribers |
( |
|
self, |
|
|
|
event |
|
) |
| |
Return an iterator for the subscribers for an event.
:param event: The event to return subscribers for.
def pip._vendor.distlib.util.EventMixin.publish |
( |
|
self, |
|
|
|
event, |
|
|
|
args, |
|
|
|
kwargs |
|
) |
| |
Publish a event and return a list of values returned by its
subscribers.
:param event: The event to publish.
:param args: The positional arguments to pass to the event's
subscribers.
:param kwargs: The keyword arguments to pass to the event's
subscribers.
def pip._vendor.distlib.util.EventMixin.remove |
( |
|
self, |
|
|
|
event, |
|
|
|
subscriber |
|
) |
| |
Remove a subscriber for an event.
:param event: The name of an event.
:param subscriber: The subscriber to be removed.
pip._vendor.distlib.util.EventMixin._subscribers |
|
private |
The documentation for this class was generated from the following file:
- orbits/lib/python2.7/site-packages/pip/_vendor/distlib/util.py
Copyright 2014 Google Inc. All rights reserved.