WebStack

examples/ModPython/SessionsApp/SessionsHandler.py

539:891bc5914432
2006-01-13 paulb [project @ 2006-01-13 17:42:03 by paulb] Simplified the sys.path configuration assuming that WebStack is installed and that the example applications are accessible relative to their handlers.
     1 #!/usr/bin/env python     2      3 # NOTE: Path manipulation may require manual customisation.     4      5 import sys, os     6 sys.path.append(os.path.abspath(os.path.join(__file__, "../../../Common")))     7      8 from WebStack.Adapters import ModPython     9 from Sessions import SessionsResource    10     11 # NOTE: Not sure if the resource should be maintained in a resource pool.    12     13 resource = SessionsResource()    14     15 def handler(req):    16     global resource    17     return ModPython.respond(req, resource, handle_errors=0)    18     19 # vim: tabstop=4 expandtab shiftwidth=4