def GetSegmentAttr(segea, attr):
    seg = idaapi.getseg(segea)
    assert seg, "could not find segment at 0x%x" % segea
    if attr in [ SEGATTR_ES, SEGATTR_CS, SEGATTR_SS, SEGATTR_DS, SEGATTR_FS, SEGATTR_GS ]:
        return idaapi.get_defsr(seg, _SEGATTRMAP[attr])
    else:
        return _IDC_GetAttr(seg, _SEGATTRMAP, attr)
Get segment attribute
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/GetSegmentAttr