# HG changeset patch # User paulb # Date 1075677373 0 # Node ID e6102e26711a42d7d29809a311e5fdd83b8b4a8c # Parent 6fe367aff979695aa4b36838eaf0307b635028db [project @ 2004-02-01 23:16:13 by paulb] Moved mod_python handlers into separate directories. diff -r 6fe367aff979 -r e6102e26711a examples/ModPython/Simple/SimpleHandler.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/ModPython/Simple/SimpleHandler.py Sun Feb 01 23:16:13 2004 +0000 @@ -0,0 +1,20 @@ +#!/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/WebStack/examples/Common") + +from WebStack.Adapters import ModPython +from SimpleApplication import SimpleResource + +# NOTE: Not sure if the resource should be maintained in a resource pool. + +resource = SimpleResource() + +def handler(req): + global resource + return ModPython.dispatch(req, resource, debug=1) + +# vim: tabstop=4 expandtab shiftwidth=4