Hi,<br><br>I want to run a turbogears site from inside Twisted via WSGI.&nbsp; This isn&#39;t documented, and I&#39;m struggling to get it to work.&nbsp; 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: &quot;twistd -noy demo.py&quot;<br>if __name__ == &#39;__builtin__&#39;:<br><br>&nbsp;&nbsp;&nbsp; update_config(configfile=&quot;
dev.cfg&quot;,modulename=&quot;quickie.config&quot;)<br>&nbsp;&nbsp;&nbsp; test = WSGI(wsgiApp)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; # Create the site and application objects<br>&nbsp;&nbsp;&nbsp; site = server.Site(test)<br>&nbsp;&nbsp;&nbsp; application = service.Application(&quot;demo&quot;)
<br><br>&nbsp;&nbsp;&nbsp; # Serve it via standard HTTP on port 8080<br>&nbsp;&nbsp;&nbsp; s = strports.service(&#39;tcp:8080&#39;, channel.HTTPFactory(site))<br>&nbsp;&nbsp;&nbsp; s.setServiceParent(application)<br><br>I&#39;m not having much luck with this, and I thought I&#39;d check on the list if anybody already had a recipe for this.
<br><br>Thanks,<br>Dave<br>