def get_imports(): for i in xrange(0, idaapi.get_import_module_qty()): name = idaapi.get_import_module_name(i) if name: yield name