Jim's
Tutorials

Spring 2009
course
navigation

Updates Journal

Feb 5, 2009

Today I looked around online for information on Twisted HTTP Servers. I mainly used the Twisted Web Developer Guide here: http://twistedmatrix.com/trac/wiki/WebDevelopmentWithTwisted
There are high-level Web Application frameworks using Twisted, such as Zope and Divmod Nevow. These are good for complete sites with databases. I am looking for a simple HTTP server for regular HTTP files, so the Twisted people recommended using TwistedWeb. TwistedWeb2 is being implemented back into TwistedWeb1, so I'll stick with the original TwistedWeb.
I installed Twisted on the myubunturouter sandbox computer, and the TwistedWeb documentation is here: http://twistedmatrix.com/projects/web/documentation/howto/using-twistedweb.html#auto2 Diagram overviewing TwistedWeb Processes
from twisted.web import server, resource from twisted.internet import reactor class Simple(resource.Resource): isLeaf = True def render_GET(self, request): return "<html>Hello, world!</html>" site = server.Site(Simple()) reactor.listenTCP(8080, site) reactor.run()
http://cs.marlboro.edu/ courses/ spring2009/tutorials/ ryan/ Updates_Journal
last modified Thursday February 5 2009 2:03 pm EST