def atBegin(self): self.__shelve = sqlite.open(self.__filename, protocol=-1, flags="w") self.__onLoadSize = len(self.__shelve) self.__size = self.__onLoadSize logger.info("Load shelve from " + self.__filename + ": urls=" + unicode(self.__onLoadSize))
def _(self, *args, **kwargs): self.db = sqlite.open() return func(self, *args, **kwargs)
def get_db(): store = sqlite.open("store.sqlite3") logger.debug("Opening store.sqlite3") return store