Package wx :: Package lib :: Module pubsub
[frames | no frames]

Module wx.lib.pubsub

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:

from wx.lib.pubsub import Publisher
Publisher().subscribe(...)
Publisher().sendMessage(...)
...

Version:

$Id: pubsub.py 53834 2008-05-30 02:27:12Z RD $

Author:

Oliver Schoenborn

Copyright:

(c) 2004 Oliver Schoenborn

License:

wxWidgets

Since:

Apr 2004

Classes
Message A simple container object for the two components of a message: the topic and the user data.
PublisherClass The publish/subscribe manager.

Function Summary
  getStrAllTopics()
Function to call if, for whatever reason, you need to know explicitely what is the string to use to indicate 'all topics'.
  test()

Function Details

getStrAllTopics()

Function to call if, for whatever reason, you need to know explicitely what is the string to use to indicate 'all topics'.


Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:02 2009 http://epydoc.sf.net