python traceback 变量值
import sys import traceback import cgitb def handleException(excType, excValue, trace): print 'error' cgitb.Hook(format="text")(excType, excValue, trace) sys.excepthook = handleException h = 1 k = 0 print h/k
import sys import traceback import cgitb def handleException(excType, excValue, trace): print 'error' cgitb.Hook(format="text")(excType, excValue, trace) sys.excepthook = handleException h = 1 k = 0 print h/k