def GetConstName(const_id):
    name = idaapi.get_enum_member_name(const_id)

    if not name:
        return ""
    else:
        return name
Get name of a constant
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/GetConstName