paulb@97 | 1 | #!/usr/bin/env python |
paulb@97 | 2 | |
paulb@97 | 3 | # NOTE: Path manipulation requires manual customisation. |
paulb@97 | 4 | |
paulb@97 | 5 | import sys |
paulb@97 | 6 | sys.path.append("/home/paulb/Software/Python/WebStack") |
paulb@97 | 7 | sys.path.append("/home/paulb/Software/Python/XSLTools") |
paulb@97 | 8 | sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common") |
paulb@97 | 9 | sys.path.append("/home/paulb/Software/Python/libxml2dom") |
paulb@97 | 10 | |
paulb@97 | 11 | from WebStack.Adapters import ModPython |
paulb@97 | 12 | import Configurator |
paulb@97 | 13 | |
paulb@99 | 14 | # Get a simple Web site. |
paulb@99 | 15 | |
paulb@99 | 16 | resource = Configurator.get_site() |
paulb@97 | 17 | |
paulb@97 | 18 | # NOTE: Not sure if the resource should be maintained in a resource pool. |
paulb@97 | 19 | |
paulb@97 | 20 | def handler(req): |
paulb@97 | 21 | global resource |
paulb@97 | 22 | return ModPython.respond(req, resource, handle_errors=0) |
paulb@97 | 23 | |
paulb@97 | 24 | # vim: tabstop=4 expandtab shiftwidth=4 |