[Twisted-Python] serving up a directory

Clark C. Evans cce at clarkevans.com
Sat Feb 22 22:57:15 EST 2003


Twisted looks pretty neat... I'm exploring it
as we speak.  Is there a Resource which I can i
add to my resource tree to recursively return 
static content in a given directory?  It really
wasn't obvious how to do this... without using
the "tap" stuff.  What I'm kinda looking for...

root = Resource()
root.putChild("dynamic",MyDynamicRequest())
root.putChild("static",StaticRequest("/var/htdocs"))

Anything like this monster?  So I can do...

  webserver/static/something.gif

  and it returns /var/htdocs/something.gif

Thanks!

Clark




More information about the Twisted-Python mailing list