3 from twisted.python import log
5 from twisted.internet import reactor
6 from twisted.spread import pb
9 root.callRemote('nextQuote').addCallbacks(success, failure)
12 stdout.write(quote + "\n")
16 stdout.write("Failed to obtain quote.\n")
19 factory = pb.PBClientFactory()
21 "localhost", # host name
22 pb.portno, # port number
28 factory.getRootObject().addCallbacks(connected, # when we get the root
29 failure) # when we can't
31 reactor.run() # start the main loop