Posted By

manatlan on 09/09/09


Tagged

python sys


Versions (?)

exceptions hook


 / Published in: Python
 

  1. import sys, traceback, string
  2.  
  3. def myExceptHook(type, value, tb):
  4. sys.__excepthook__(type, value, tb)
  5. lines = traceback.format_exception(type, value, tb)
  6. print string.join(lines)
  7.  
  8. sys.excepthook = myExceptHook

Report this snippet  

You need to login to post a comment.