def NextFunction(ea):
    func = idaapi.get_next_func(ea)

    if not func:
        return BADADDR
    else:
        return func.startEA
Find next function
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/NextFunction