python : redirect exceptions hook
import sys, traceback, string def myExceptHook(type, value, tb): sys.__excepthook__(type, value, tb) lines = traceback.format_exception(type, value, tb) print string.join(lines) sys.excepthook = myExceptHook
DZone Snippets > manatlan > exceptions
12389 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
manatlan http://manatlan.online.fr
import sys, traceback, string def myExceptHook(type, value, tb): sys.__excepthook__(type, value, tb) lines = traceback.format_exception(type, value, tb) print string.join(lines) sys.excepthook = myExceptHook