Exemplo n.º 1
0
#
# https://jcalderone.livejournal.com/tag/sixty%20seconds

import sys

if __package__:
    from . import daemon_factory
else:
    import daemon_factory

#raise Exception("Not implemented yet")

# Possible implementation: Iterate on all CGI scripts:
if False:
    from twisted.web.twcgi import CGIScript
    resource = CGIScript("/survol/entity.py")

    def start_server():
        daemon_factory.supervisor_startup()


# There is a standard way to start a defined twisted server, from the command line.
if False:
    from twisted.web.resource import Resource
    from twisted.web import server

    class MySite(Resource):
        def render_GET(self, request):
            request.write("<!DOCTYPE html>")
            request.write("<html><head>")
            request.write("<title>Twisted Driven Site</title>")