Your search query "linkto%3A%22Twisted-Examples%22" didn't return any results. Please change some terms and refer to HelpOnSearching for more information.
(!) Consider performing a full-text search with your search terms.

Clear message

Python Twisted Examples

For current and complete Twisted documentation, please refer to http://twistedmatrix.com/trac/wiki/Documentation

This page maintained by Jacob Mathai.

http://www.jacobmathai.org

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()

[jacob@tux]$ python proxy.py
/usr/lib/python2.3/site-packages/twisted/web/proxy.py:22: DeprecationWarning: twisted.protocols.http has moved to twisted.web.http. See http://twistedmatrix.com/projects/web.
  from twisted.protocols import http
2005/12/06 21:47 EST [-] Log opened.
2005/12/06 21:47 EST [-] __main__.ProxyFactory starting on 8080
2005/12/06 21:47 EST [-] Starting factory <__main__.ProxyFactory instance at 0xb73577ac>

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