(self, topic=None, listener=None, didit=None)
Give this to pub.subscribe() as listener of
        'pubsub.subscribe' messages.
Give this to pub.subscribe() as listener of
        'pubsub.subscribe' messages.
Give this to pub . subscribe () as listener of pubsub . subscribe messages .
def subscribe(self, topic=None, listener=None, didit=None):
        """Give this to pub.subscribe() as listener of
        'pubsub.subscribe' messages."""
        if didit:
            msg = '%sSubscribed listener %s to topic "%s"\n'
        else:
            msg = '%sSubscription of %s to topic "%s" redundant\n'
        msg = msg % (self.prefix, listener, topic.getName())
        self._out.write(msg)
        self.lastTopic = topic.getName()
        self.lastLogTopic = 'pubsub.subscribe'
        self.counts['sub'] += 1
        self.lastMsg = msg
def subscribe ( self , topic = None , listener = None , didit = None ) : if didit : msg = '%sSubscribed listener %s to topic "%s"\n' else : msg = '%sSubscription of %s to topic "%s" redundant\n' msg = msg % ( self . prefix , listener , topic . getName ( ) ) self . _out . write ( msg ) self . lastTopic = topic . getName ( ) self . lastLogTopic = 'pubsub.subscribe' self . counts [ 'sub' ] += 1 self . lastMsg = msg