#!/usr/bin/python -i
from circuits import Component, Debugger, Event
class Hello(Event):
"""Hello Event"""
class Foo(Event):
"""Foo Event"""
class Bar(Event):
"""Bar Event"""
class App(Component):
def foo(self):
return 1
def bar(self):
return 2
def hello(self):
x = yield self.call(Foo())
y = yield self.call(Bar())
yield x.value + y.value
app = App() + Debugger()
app.start()