.. include:: headings.inc .. module:: lib.pubsub.core .. currentmodule:: lib.pubsub.core .. highlight:: python .. _lib.pubsub.core: ========================================================================================================================================== |phoenix_title| **core** ========================================================================================================================================== Core package of pubsub, holding the publisher, listener, and topic object modules. Functions defined here are used internally by pubsub so that the right modules can be found later, based on the selected messaging protocol. Indeed some of the API depends on the messaging protocol used. For instance sendMessage(), defined in publisher.py, has a different signature (and hence implementation) for the kwargs protocol than for the arg1 protocol. The most convenient way to support this is to put the parts of the package that differ based on protocol in separate folders, and add one of those folders to the package's __path__ variable (defined automatically by the Python interpreter when __init__.py is executed). For instance, code specific to the kwargs protocol goes in the kwargs folder, and code specific to the arg1 protocol in the arg1 folder. Then when doing "from pubsub.core import listener", the correct listener.py will be found for the specified protocol. The default protocol is kwargs. Only one protocol can be used in an application. The default protocol, if none is chosen by user, is kwargs, as selected by the call to _prependModulePath() at end of this file. :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :license: BSD, see LICENSE.txt for details. |module_summary| Modules Summary ================================ ================================================================================ ================================================================================ :mod:`~lib.pubsub.core.callables` Low level functions and classes related to callables. :mod:`~lib.pubsub.core.datamsg` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.imp2` The _resolve_name and _import_module were taken from the backport of :mod:`~lib.pubsub.core.listener` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.listenerbase` Higher-level classes and functions related to listening of pubsub messages. :mod:`~lib.pubsub.core.listenerimpl` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.notificationmgr` Manages notifications by pubsub. Pubsub notifies this manager once for :mod:`~lib.pubsub.core.notificationmgr_old` First generation of notification handler could only have one registered :mod:`~lib.pubsub.core.policies` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.publisher` Mixin for publishing messages to a topic's listeners. This will be :mod:`~lib.pubsub.core.publisherbase` Provides the Publisher class, which manages subscribing callables to :mod:`~lib.pubsub.core.publishermixin` Mixin for publishing messages to a topic's listeners. This will be :mod:`~lib.pubsub.core.topicargspec` Definitions related to listener signature specification. :mod:`~lib.pubsub.core.topicargspecimpl` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.topicdefnprovider` Everything that has to do with topic definition tree import/export. :mod:`~lib.pubsub.core.topicexc` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.topicmgr` Everything regarding the concept of topic. :mod:`~lib.pubsub.core.topicmgrimpl` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.topicobj` Represent topics in pubsub. Topic objects contain all information about :mod:`~lib.pubsub.core.topictreetraverser` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.topicutils` Various little utilities used by topic-related modules. :mod:`~lib.pubsub.core.treeconfig` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.validatedefnargs` :copyright: Copyright 2006-2009 by Oliver Schoenborn, all rights reserved. :mod:`~lib.pubsub.core.weakmethod` This module provides a basic "weak method" implementation. It is necessary ================================================================================ ================================================================================ | .. toctree:: :maxdepth: 1 :hidden: lib.pubsub.core.callables lib.pubsub.core.datamsg lib.pubsub.core.imp2 lib.pubsub.core.listener lib.pubsub.core.listenerbase lib.pubsub.core.listenerimpl lib.pubsub.core.notificationmgr lib.pubsub.core.notificationmgr_old lib.pubsub.core.policies lib.pubsub.core.publisher lib.pubsub.core.publisherbase lib.pubsub.core.publishermixin lib.pubsub.core.topicargspec lib.pubsub.core.topicargspecimpl lib.pubsub.core.topicdefnprovider lib.pubsub.core.topicexc lib.pubsub.core.topicmgr lib.pubsub.core.topicmgrimpl lib.pubsub.core.topicobj lib.pubsub.core.topictreetraverser lib.pubsub.core.topicutils lib.pubsub.core.treeconfig lib.pubsub.core.validatedefnargs lib.pubsub.core.weakmethod Functions ------------ .. function:: setMsgDataArgName(stage, listenerArgName, senderArgNameAny=False) .. function:: setMsgProtocol(protocol)