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