def _install_exception_handler(self):
def handler(t, value, traceback):<EOL><INDENT>if self.args.verbose:<EOL><INDENT>sys.__excepthook__(t, value, traceback)<EOL><DEDENT>else:<EOL><INDENT>sys.stderr.write('<STR_LIT>' % unicode(value).encode('<STR_LIT:utf-8>'))<EOL><DEDENT><DEDENT>sys.excepthook = handler<EOL>
Installs a replacement for sys.excepthook, which handles pretty-printing uncaught exceptions.