[Twisted-Python] running several services from a single app

Jeroen van Veen j.veenvan at gmail.com
Fri Apr 1 03:51:20 EDT 2011


I've done something simular in  
https://github.com/phrearch/hwios/blob/master/services/web_ui/service.py

Probably not the best example, but works for me.

kind regards,

Jeroen

On Thursday, March 31, 2011 08:45:49 AM Aljoša Mohorović wrote:
> now i looking at adding an wsgi app to this setup.
> i'm reading
> http://twistedmatrix.com/documents/current/web/howto/web-in-60/wsgi.html
> but can't figure out howto get factory for wsgi if i have:
> 
> ===
> def application(environ, start_response):
>     start_response('200 OK', [('Content-type', 'text/plain')])
>     return ['Hello, world!']
> resource = WSGIResource(reactor, reactor.getThreadPool(), application)
> ===
> 
> i'm looking for something like "reactor.listenTCP(10000,
> wsgi_factory)" but don't know howto do it.
> please point me to proper docs.
> thanks
> 
> Aljosa
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python



More information about the Twisted-Python mailing list