# HG changeset patch # User paulb # Date 1128460783 0 # Node ID 78746a239604a0da6986ffc29a23d49efb762de3 # Parent 4030f65df269f593e485a80ae7ede5c3203c5064 [project @ 2005-10-04 21:19:43 by paulb] Added example. diff -r 4030f65df269 -r 78746a239604 examples/ModPython/CandidateApp/CandidateHandler.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/ModPython/CandidateApp/CandidateHandler.py Tue Oct 04 21:19:43 2005 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# NOTE: Path manipulation requires manual customisation. + +import sys +sys.path.append("/home/paulb/Software/Python/WebStack") +sys.path.append("/home/paulb/Software/Python/XSLTools") +sys.path.append("/home/paulb/Software/Python/XSLTools/examples/Common") +sys.path.append("/home/paulb/Software/Python/libxml2dom") + +from WebStack.Adapters import ModPython +import Candidate + +# Get a simple Web site. + +resource = Candidate.get_site() + +# NOTE: Not sure if the resource should be maintained in a resource pool. + +def handler(req): + global resource + return ModPython.respond(req, resource, handle_errors=0) + +# vim: tabstop=4 expandtab shiftwidth=4