From PyPubSub:
Pypubsub provides a simple way for your Python application to decouple its components: parts of your application can publish messages (with or without data) and other parts can subscribe/receive them. This allows message "senders" and message "listeners" to be unaware of each other:
- one doesn't need to import the other
- a sender doesn't need to know
- "who" gets the messages,
- what the listeners will do with the data,
- or even if any listener will get the message data.
- similarly, listeners don't need to worry about where messages come from.
This is a great tool for implementing a Model-View-Controller architecture or any similar architecture that promotes decoupling of its components.
There seem to be quite a few Python modules for publishing/subscribing floating around the web, from PyPubSub, to PyDispatcher to simple "home-cooked" classes.
Can you recommend a module that works well in most cases ? Which modules have you had positive experience with ? Negative ?
Thanks in advance