[Twisted-Python] inlineCallbacks

Pet petshmidt at googlemail.com
Tue Oct 6 08:47:48 MDT 2009


Hi,

calling in client code self.cred.login() I can't print login result.
What I'm doing wrong? login method returns deffered, but should yield
result from callRemote method.

Thanks for any help!

Pet

class Cred:

    @inlineCallbacks
    def login(self):
        proxy = Proxy(LOGIN_PROXY)
        l = {"user":LOGIN_USERNAME, "pass":LOGIN_PASSWD}
        loginResult = yield proxy.callRemote('login', l)
        print "RESULT", loginResult.result
        returnValue(loginResult)



More information about the Twisted-Python mailing list