2004-12-20 | paulb | file changeset files shortlog | [project @ 2004-12-20 21:05:10 by paulb] Added notes on JythonServlet configuration. Updated Twisted notes. |
paulb@220 | 1 | #!/usr/bin/env python |
paulb@220 | 2 | |
paulb@220 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@220 | 4 | from Unicode import UnicodeResource |
paulb@220 | 5 | import BaseHTTPServer |
paulb@220 | 6 | |
paulb@220 | 7 | # Special magic incantation. |
paulb@220 | 8 | |
paulb@220 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(UnicodeResource()) |
paulb@220 | 10 | address = ("", 8080) |
paulb@220 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@265 | 12 | print "Serving..." |
paulb@220 | 13 | server.serve_forever() |
paulb@220 | 14 | |
paulb@220 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |