Revision 3 as of 2005-12-05 14:15:39

Clear message

Python Twisted Examples

This page maintained by ["Mathai"].

http://jacobmathai.blogspot.com

If your OpenSSL ore kerberos header files are not in /usr/include, you may need to supply the -I flag to let the setup script know where to look. The same goes for the libraries of course, use the -L flag. Note that build won't accept these flags, so you have t o run first build_ext and then build! Example:

Simple HTTP Proxy Server (proxy.py)

from twisted.web import proxy, http
from twisted.internet import reactor
from twisted.python import log
import sys
log.startLogging(sys.stdout)
 
class ProxyFactory(http.HTTPFactory):
        protocol = proxy.Proxy
 
reactor.listenTCP(8080, ProxyFactory())
reactor.run()

Unable to edit the page? See the FrontPage for instructions.