def NextSeg(ea):
    nextseg = idaapi.get_next_seg(ea)
    if not nextseg:
        return BADADDR
    else:
        return nextseg.startEA

    return BADADDR
Get next segment
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/NextSeg