[ create a new paste ] login | about

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

Python, pasted on Dec 17:
#!/usr/bin/env ptyhon


from circuits import Component, Debugger, Event, TimeoutError


class foo(Event):
    """foo Event"""


class App(Component):

    def started(self, *args):
        try:
            x = yield self.call(foo(), timeout=2)
            print x
        except TimeoutError as e:
            print("ERROR: {0:s}".format(e))
            print("Timedout while waiting for foo()")


(App() + Debugger()).run()


Create a new paste based on this one


Comments: