2004-02-07 | paulb | file changeset files shortlog | [project @ 2004-02-07 23:49:03 by paulb] Renamed Simple example. |
paulb@37 | 1 | #!/usr/bin/env python |
paulb@37 | 2 | |
paulb@37 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@37 | 4 | from SimpleApplication import SimpleResource |
paulb@37 | 5 | import BaseHTTPServer |
paulb@37 | 6 | |
paulb@37 | 7 | # Special magic incantation. |
paulb@37 | 8 | |
paulb@37 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(SimpleResource()) |
paulb@37 | 10 | address = ("", 8080) |
paulb@37 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@37 | 12 | server.serve_forever() |
paulb@37 | 13 | |
paulb@37 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |