Initial import to Tizen
[profile/ivi/python-twisted.git] / doc / core / examples / pbsimple.py
1
2 # Copyright (c) Twisted Matrix Laboratories.
3 # See LICENSE for details.
4
5
6 from twisted.spread import pb
7 from twisted.internet import reactor
8
9 class Echoer(pb.Root):
10     def remote_echo(self, st):
11         print 'echoing:', st
12         return st
13
14 if __name__ == '__main__':
15     reactor.listenTCP(8789, pb.PBServerFactory(Echoer()))
16     reactor.run()