[Twisted-Python] Re: Twisted-Python digest, Vol 1 #749 - 5 msgs
Stuart Hungerford
stuart.hungerford at anu.edu.au
Mon May 12 19:50:24 MDT 2003
Moshe writes:
>> I understand that I could create a project.rpy file which creates
>> a resource but I need to use the unadorned resource names above
>> rather than http://example.org:8080/project/project.rpy
>
>This is why Twisted Web supports ignoring extension. I'm not sure how
>you're deploying your server. If you are writing a configuration file
>by hand you can do something like:
>
>"""
>from twisted.internet import app
>from twisted.web import static, server, script
>
>root = static.File("/serve/example")
>root.processors = {'.rpy': script.ResourceScript}
>root.ignoreExt('.rpy')
>application = app.Application('web')
>application.listenTCP(8080, server.Site(root)
>"""
>
>If you use mktap,
>% mktap web --path=/serve/example --ignore-ext=.rpy --port=8080
>should work.
> [...]
Thanks for the advice, it's just what I need. It also
shows just how flexible the underlying Twisted components
are.
Cheers,
Stu
--
:: Stuart Hungerford (stuart.hungerford at anu.edu.au)
:: ANU Internet Futures Group
More information about the Twisted-Python
mailing list