def get_library(self, namespace): if namespace not in self._libs: paths = GIRepository().get_shared_library(namespace) if not paths: raise NotImplementedError("No shared library") path = paths.split(",")[0] self._libs[namespace] = self._ffi.dlopen(path) return self._libs[namespace]
def get_library(self, namespace): if namespace not in self._libs: paths = GIRepository().get_shared_library(namespace) if not paths: return path = paths.split(",")[0] lib = load_ctypes_library(path) self._libs[namespace] = lib return self._libs[namespace]