1 import req, dispatch, session
3 def wsgiwrap(callable):
4 def wrapper(env, startreq):
5 return dispatch.handle(req.origrequest(env), startreq, callable)
8 def persession(data = None):
11 sess = session.get(req)
12 if callable not in sess:
14 sess[callable] = callable()
18 sess[callable] = callable(data)
19 return sess[callable].handle(req)