Ejemplo n.º 1
0
def run():
    '''Loop until we get a quit message or user breaks.'''
    doSomething1()
    doSomething2()
    
    from pubsub.utils import printTreeDocs
    print 'done\nTopic tree TMDS:'
    printTreeDocs(extra="a")
    print '\nTopic tree listeners:'
    printTreeDocs(extra="L")
    def _log_recieve(self, listener_name):
        info_list = self.binder.get_info(listener_name)
        for info in info_list:
            obj = info['object_name']
            evt = info['event_name']
            cls = info['class_name']
            mes = 'Recieved {0} of {1}:{2} at {3}'
            Log( mes.format(evt, obj, cls, listener_name) )

if __name__ == '__main__':
    from album_view import AlbumView
    from album_model import AlbumModel

    v = AlbumView()
    m = AlbumModel()

    p = AlbumPresenter(m, v)

    m.update_event.fire()
    v.change_event.fire()
    m.change_event.fire()


    from pubsub.utils import printTreeDocs
    printTreeDocs(extra="a")
    print '\nTopic tree listeners:'
    printTreeDocs(extra="L")