Handle an uncaught exception. We always forward the exception on to
        whatever `sys.excepthook` was present upon setup. However, if the
        exception is a KeyboardInterrupt, we additionally kill ourselves with
        an uncaught SIGINT, so that invoking programs know what happened.

def excepthook (self, etype, evalue, etb):
        """Handle an uncaught exception. We always forward the exception on to
        whatever `sys.excepthook` was present upon setup. However, if the
        exception is a KeyboardInterrupt, we additionally kill ourselves with
        an uncaught SIGINT, so that invoking programs know what happened.

        """
        self.inner_excepthook (etype, evalue, etb)

        if issubclass (etype, KeyboardInterrupt):
            # Don't try this at home, kids. On some systems os.kill (0, ...)
            # signals our entire progress group, which is not what we want,
            # so we use os.getpid ().
            signal.signal (signal.SIGINT, signal.SIG_DFL)
            os.kill (os.getpid (), signal.SIGINT)