def debugmethod(meth):
    def _lambda(*iargs, **ikwargs):
        try:
            return meth(*iargs, **ikwargs)
        except:
            ex, val, tb = sys.exc_info()
            from pycopia import debugger
            debugger.post_mortem(tb, ex, val)
    return _lambda
Utility function that enables appstats middleware.
dataset/ETHPy150Open kdart/pycopia/aid/pycopia/aid.py/debugmethod--crossover with--dataset/ETHPy150Open gregorynicholas/flask-gae_runtools/gae_runtools.py/enable_appstats