[ create a new paste ] login | about

Link: http://codepad.org/2fcVDS5i    [ raw code | fork ]

Python, pasted on Jan 4:
#!/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()


Create a new paste based on this one


Comments: