__author__ = 'Xsank'
import time
from thinkutils_plus.eventbus.eventbus import EventBus

from myevent import GreetEvent
from myevent import ByeEvent
from mylistener import MyListener


if __name__=="__main__":
    eventbus=EventBus()
    eventbus.register(MyListener())
    ge=GreetEvent('world')
    be=ByeEvent('world')
    eventbus.async_post(be)
    eventbus.post(ge)
    time.sleep(0.1)
    eventbus.unregister(MyListener())
    eventbus.destroy()
[((11, 13, 11, 23), 'thinkutils_plus.eventbus.eventbus.EventBus', 'EventBus', ({}, {}), '()', False, 'from thinkutils_plus.eventbus.eventbus import EventBus\n'), ((13, 7, 13, 26), 'myevent.GreetEvent', 'GreetEvent', ({(13, 18, 13, 25): '"""world"""'}, {}), "('world')", False, 'from myevent import GreetEvent\n'), ((14, 7, 14, 24), 'myevent.ByeEvent', 'ByeEvent', ({(14, 16, 14, 23): '"""world"""'}, {}), "('world')", False, 'from myevent import ByeEvent\n'), ((17, 4, 17, 19), 'time.sleep', 'time.sleep', ({(17, 15, 17, 18): '(0.1)'}, {}), '(0.1)', False, 'import time\n'), ((12, 22, 12, 34), 'mylistener.MyListener', 'MyListener', ({}, {}), '()', False, 'from mylistener import MyListener\n'), ((18, 24, 18, 36), 'mylistener.MyListener', 'MyListener', ({}, {}), '()', False, 'from mylistener import MyListener\n')]