def _publish(self, msg): WxPublisher().sendMessage(msg.topic, msg)
def __init__(self, listener, topic): self.listener = listener self.topic = self._get_topic(topic) WxPublisher().subscribe(self, self.topic)
def unsubscribe(self): WxPublisher().unsubscribe(self, self.topic)
def publish(self, topic, data): WxPublisher().sendMessage(topic, data)