as sys.exc_info() but returns a remote exception object

def exc_info(hide_calls = 0):
    '''as sys.exc_info() but returns a remote exception object'''
    ErrorType, thrownError, traceback = sys.exc_info()
    for i in range(hide_calls):
        if traceback.tb_next:
            traceback = traceback.tb_next
    err = withTracebackPrint(ErrorType, thrownError, traceback)
    return type(err), err, traceback