def _get_modules():
    module = idaapi.module_info_t()
    result = idaapi.get_first_module(module)
    while result:
        yield module
        result = idaapi.get_next_module(module)
INTERNAL: Enumerate process modules
dataset/ETHPy150Open EiNSTeiN-/idapython/python/idc.py/_get_modules