loops/agent/loops.tac
helmutm eee4e198c0 make runnable on Linux (ignore win imports conditionally); avoid hard-coded path and port setting
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2105 fd906abe-77d9-0310-91a1-e0d9ade77398
2007-10-09 07:19:17 +00:00

22 lines
478 B
Python

"""
Start with ``twistd -noy loops/agent/loops.tac``.
$Id$
"""
from twisted.application import internet, service
from nevow import appserver
from loops.agent.core import Agent
from loops.agent.ui.web import AgentHome
agent = Agent()
conf = agent.config
port = conf.ui.web.port or 10095
application = service.Application('LoopsAgent')
site = appserver.NevowSite(resource=AgentHome(agent))
webServer = internet.TCPServer(port, site)
webServer.setServiceParent(application)