def FirstSeg():
    seg = idaapi.get_first_seg()
    if not seg:
        return BADADDR
    else:
        return seg.startEA
Get first segment
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/FirstSeg