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 :)
Hope that helps,
- Sylvain
--
Sylvain Hellegouarch
http://www.defuze.org
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.
Diez
Sure:
import cherrypy
def application(environ, start_response):
start_response("200 OK", [])
return ["Hello world"]
cherrypy.tree.graft(application, '')
cherrypy.quickstart()
- Sylvain
That did not work, however passing a Dummy and mapping it to some arbitrary
path works. Now I only have to figure out how to make the reloading-error I'm
getting go disappear, but that is most probably related to some packaging
problems we do suffer from here. Thanks for your help!
Diez
Now that is strange since that code was pasted straight from IDLE and
running just fine.Maybe a CP version difference.
- Sylvain