Google Groups Home
Help | Sign in
Message from discussion wsgi-app + reload
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Sylvain Hellegouarch  
View profile
 More options May 13, 10:13 am
From: "Sylvain Hellegouarch" <s...@defuze.org>
Date: Tue, 13 May 2008 16:13:30 +0200 (CEST)
Local: Tues, May 13 2008 10:13 am
Subject: Re: [cherrypy-users] Re: wsgi-app + reload

> On Tuesday 13 May 2008 14:44:16 Sylvain Hellegouarch wrote:
>> Off the top of my head:

>> import cherrypy

>> class Dummy: pass

>> wsgi_app = ...

>> cherrypy.tree.graft(wsgi_app, '/some/path')
>> cherrypy.quickstart(Dummy(), '/')

>> Your WSGI application is just grafted and served by the WSGI server but
>> the whole CherryPy engine is started as well hence you can use
>> autoreload
>> and other goodies :)

> I will try that, one question though: it is necessary that my wsgi-app is
> served from root. will that work as well? I don't mind serving dummy from
> some arbitrary url. But the app itself must be root.

Sure:

import cherrypy

def application(environ, start_response):
    start_response("200 OK", [])
    return ["Hello world"]

cherrypy.tree.graft(application, '')
cherrypy.quickstart()

- Sylvain


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google