http://pypi.python.org/pypi/message
http://code.google.com/p/python-message/
Sample:
import message def hello(name): print "hello, %s." % name message.sub("greet", hello) message.pub("greet", "fk")output: hello, fk
具体用途是解耦合
②被调用模块的函数pub一个主题和消息
①调用该模块的地方sub该主题,调用执行后都可以收到pub的消息
http://blog.csdn.net/gzlaiyonghao/article/details/6074095