This module provides a publish-subscribe component that allows
listeners to subcribe to messages of a given topic. Contrary to the
original wxPython.lib.pubsub module (which it is based on), it uses weak
referencing to the subscribers so the lifetime of subscribers is not
affected by Publisher. Also, callable objects can be used in addition to
functions and bound methods. See Publisher class docs for more
details.
Thanks to Robb Shecter and Robin Dunn for having provided the basis
for this module (which now shares most of the concepts but very little
design or implementation with the original wxPython.lib.pubsub).
The publisher is a singleton instance of the PublisherClass class. You
access the instance via the Publisher object available from the
module:
:Author: Oliver Schoenborn :Since: Apr 2004 :Version:
$Id: pubsub.py 51098 2008-01-08 08:29:23Z CJP $ :Copyright: \(c) 2004
Oliver Schoenborn :License: wxWidgets
|
|
_isbound(method)
Return true if method is a bound method, false otherwise |
source code
|
|
|
|
_paramMinCountFunc(function)
Given a function, return pair (min,d) where min is minimum # of args
required, and d is number of default arguments. |
source code
|
|
|
|
_paramMinCount(callableObject)
Given a callable object (function, method or callable instance),
return pair (min,d) where min is minimum # of args required, and d is
number of default arguments. |
source code
|
|
|
|
_tupleize(items)
Convert items to tuple if not already one, so items must be a list,
tuple or non-sequence |
source code
|
|
|
|
_getCallableName(callable)
Get name for a callable, ie function, bound method or callable
instance |
source code
|
|
|
|
_removeItem(item,
fromList)
Attempt to remove item from fromList, return true if successful,
false otherwise. |
source code
|
|
|
|
|
|
|
getStrAllTopics()
Function to call if, for whatever reason, you need to know
explicitely what is the string to use to indicate 'all topics'. |
source code
|
|
|
|
|