[Twisted-Python] Subclassing static.File
ram at forefront-tech.com
Mon Aug 4 20:10:22 EDT 2003
Warning: newbie alert:
Just beginning to look into Twisted, and I'm really impressed with the
breadth of the functionality here.
But, I'm having a bit of trouble getting my head fully around this thing.
Here's what I'm currently having trouble with.
Here's a simple program (that doesn't work) that subclasses the static.File
from twisted.internet import app
from twisted.web import static, server
def __init__(self, path, defaultType="text/html", ignoredExts=(),
static.File(self, path, defaultType, ignoredExts, registry,
def render(self, request):
root = FileLogger('/home/me/twtest')
a = app.Application('web')
When I hit the site with a browser, the browser hangs. Interrupting the
twisted session causes the page to immediately appear in the browser.
...Comment out the override of the render() function, and everything works
What's going on?
More information about the Twisted-Python