def get_except(self, func, *args, **kw):
    try:
        func(*args, **kw)
    except Exception as detail:
        import traceback
        traceback.print_exc()
        return (detail.__class__, str(detail))
def get_except(self, func, *args, **kw):
    try:
        func(*args, **kw)
    except Exception as detail:
        import traceback
        traceback.print_exc()
        return (detail.__class__, str(detail))