Hi,<br><br>I want to run a turbogears site from inside Twisted via WSGI. This isn't documented, and I'm struggling to get it to work. This is what I have so far:<br><br>from twisted.web2 import wsgi<br>from twisted.application
import service, strports<br>from twisted.web2 import server, channel<br>from twisted.python import util<br>from turbogears import update_config, start_server<br>from twisted.web2.wsgi import WSGIResource as WSGI<br>from cherrypy._cpwsgi import wsgiApp
<br>import cherrypy<br>cherrypy.lowercase_api = True<br><br><br># This part gets run when you run this file via: "twistd -noy demo.py"<br>if __name__ == '__builtin__':<br><br> update_config(configfile="
dev.cfg",modulename="quickie.config")<br> test = WSGI(wsgiApp)<br> <br> # Create the site and application objects<br> site = server.Site(test)<br> application = service.Application("demo")
<br><br> # Serve it via standard HTTP on port 8080<br> s = strports.service('tcp:8080', channel.HTTPFactory(site))<br> s.setServiceParent(application)<br><br>I'm not having much luck with this, and I thought I'd check on the list if anybody already had a recipe for this.
<br><br>Thanks,<br>Dave<br>