[Twisted-Python] Resource perplexity

Christopher Armstrong radix at twistedmatrix.com
Mon Aug 12 17:15:07 EDT 2002

On Mon, 2002-08-12 at 17:10, Steve Waterbury wrote:

> def main():
>     from twisted.internet.app import Application
>     from twisted.web import server
>     # Resource multiplexer 'mux'; dispatches requests to Web,
>     # XML-RPC, or SOAP handler, depending on base URL.  Standard
>     # base URLs: 'WWW', 'RPC2', 'SOAP' (probably should be
>     # case-insensitive).
>     mux = resource.Resource()
>     mux.putChild('/RPC2/', Echoer())

Your putChild usage is wrong. `mux.putChild("RPC2", Echoer())' should do
the trick. putChild adds a child relative to the resource you're calling
it on.

                                Chris Armstrong
                         << radix at twistedmatrix.com >>

More information about the Twisted-Python mailing list