1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/BaseHTTPRequestHandler/SessionsApp.py Sun Sep 05 15:52:20 2004 +0000
1.3 @@ -0,0 +1,14 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from WebStack.Adapters import BaseHTTPRequestHandler
1.7 +from Sessions import SessionsResource
1.8 +import BaseHTTPServer
1.9 +
1.10 +# Special magic incantation.
1.11 +
1.12 +handler = BaseHTTPRequestHandler.HandlerFactory(SessionsResource())
1.13 +address = ("", 8080)
1.14 +server = BaseHTTPServer.HTTPServer(address, handler)
1.15 +server.serve_forever()
1.16 +
1.17 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/examples/CGI/SessionsHandler.py Sun Sep 05 15:52:20 2004 +0000
2.3 @@ -0,0 +1,15 @@
2.4 +#!/usr/bin/env python
2.5 +
2.6 +# NOTE: Path manipulation requires manual customisation.
2.7 +
2.8 +import sys
2.9 +sys.path.append("/home/paulb/Software/Python/WebStack")
2.10 +sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common")
2.11 +
2.12 +from WebStack.Adapters import CGI
2.13 +from Sessions import SessionsResource
2.14 +
2.15 +resource = SessionsResource()
2.16 +CGI.respond(resource)
2.17 +
2.18 +# vim: tabstop=4 expandtab shiftwidth=4