|Version 2 (modified by itamar, 5 years ago) (diff)|
Twisted 11.0.0 tar
Twisted 11.0.0 for Python 2.5
Twisted 11.0.0 for Python 2.6
Twisted 11.0.0 for Python 2.7
The Twisted Book
What is Twisted?
Twisted is an event-driven networking engine written in Python and licensed under the MIT license.
Easily Implement Custom Servers and Clients
Twisted makes it easy to implement servers. Here's a TCP server that echoes back everything that's written to it:
from twisted.internet import protocol, reactor class Echo(protocol.Protocol): def dataReceived(self, data): self.transport.write(data) class EchoFactory(protocol.Factory): def buildProtocol(self, addr): return Echo() reactor.listenTCP(1234, EchoFactory()) reactor.run()
More Useful Pointers: