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