def display(self, request): d = defer.Deferred() d2 = defer.Deferred() d3 = defer.Deferred() d.callback([d2]) d2.callback([d3]) d3.callback(["correct"]) return [d]
def getIdentityRequest(self, name): """Get a Deferred callback registration object. I return a deferred (twisted.python.defer.Deferred) which will be called back to when an identity is discovered to be available (or errback for unavailable). It will be returned unarmed, so you must arm it yourself. """ req = defer.Deferred() if self.identities.has_key(name): req.callback(self.identities[name]) else: req.errback("unauthorized") return req
def remote_doItLater(self): d = defer.Deferred() d.addCallbacks(self.runMe, self.dontRunMe) self.d = d return d
def __init__(self): self.deferred = defer.Deferred() self.io = StringIO() self.write = self.io.write
def display(self, request): d = defer.Deferred() d.callback(["correct"]) return [d]
def display(self, request): d = defer.Deferred() d.callback([self.text]) return [d]
def makeListOf(self, echoer): d = defer.Deferred() echoer.echo(self.echotext, pbcallback=d.callback, pberrback=d.errback) d.addCallbacks(widgets.listify, self.formatTraceback) return [d]
def getEchoPerspective(self): d = defer.Deferred() pb.connect(d.callback, d.errback, "localhost", pb.portno, "guest", "guest", "pbecho", "guest", 1) d.addCallbacks(self.makeListOf, self.formatTraceback) return ['<b>', d, '</b>']