2004-09-05 | paulb | file changeset files shortlog | [project @ 2004-09-05 15:52:18 by paulb] Added the session example for frameworks using WebStack.Helpers.Session. |
paulb@240 | 1 | #!/usr/bin/env python |
paulb@240 | 2 | |
paulb@240 | 3 | from WebStack.Adapters import BaseHTTPRequestHandler |
paulb@240 | 4 | from Sessions import SessionsResource |
paulb@240 | 5 | import BaseHTTPServer |
paulb@240 | 6 | |
paulb@240 | 7 | # Special magic incantation. |
paulb@240 | 8 | |
paulb@240 | 9 | handler = BaseHTTPRequestHandler.HandlerFactory(SessionsResource()) |
paulb@240 | 10 | address = ("", 8080) |
paulb@240 | 11 | server = BaseHTTPServer.HTTPServer(address, handler) |
paulb@240 | 12 | server.serve_forever() |
paulb@240 | 13 | |
paulb@240 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |