1 # test the PB finger on port 8889
2 # this code is essentially the same as
3 # the first example in howto/pb-usage
5 from twisted.spread import pb
6 from twisted.internet import reactor
9 print "got object:", object
10 object.callRemote("getUser","moshez").addCallback(gotData)
12 # object.callRemote("getUsers").addCallback(gotData)
15 print 'server sent:', data
18 def gotNoObject(reason):
19 print "no object:",reason
22 factory = pb.PBClientFactory()
23 reactor.connectTCP("127.0.0.1",8889, factory)
24 factory.getRootObject().addCallbacks(gotObject,gotNoObject)