def keys(self): """Generates all Static Ids""" for fullname in self.all_files(): (_, _, fileBaseName, fileExtension) = getFileTuple(fullname) if self.allowed_extensions and fileExtension not in self.allowed_extensions: continue yield fileBaseName.split(".")[0]
def __init__(self, fullpath): Repository.__init__(self) self._content = {} from pypository.search.Searcher import Searcher (_, _, fileBaseName, _) = getFileTuple(fullpath) import imp myobj = imp.load_source(fileBaseName, fullpath) for element in myobj.mylist: self._content[self._generatekey(element)] = element self._searcher = Searcher(self)