On Fri, 24 Jun 2005 12:35:40 GMT, flupke <[EMAIL PROTECTED]> wrote: >I need to program and setup serveral webservices. >If i were still using jsp, i would use Tomcat to make the several >applications available on a given port. >How can i accomplish this in Python? >I was thinking about Twisted but it's not clear to me what parts i need >to make a webserver listen on a certain port and having it serve >different application based on the url that i received. > >Any advice on this?
Roughly, from twisted.web import server, resource from twisted.internet import reactor root = resource.Resource() root.putChild("app1", getApp1()) root.putChild("app2", getApp2()) ... site = server.Site(root) reactor.listenTCP(80, site) reactor.run() You might also want to join the twisted-web mailing list: http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web Jp -- http://mail.python.org/mailman/listinfo/python-list