Ejemplo n.º 1
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)
Ejemplo n.º 2
0
def search(query, repositories):
    from pypository.search.Searcher import Searcher
    from pypository.search.Indexer import Indexer
    searcher = Searcher([Indexer(x) for x in repositories])
    return searcher.search(query)
Ejemplo n.º 3
0
 def __init__(self, dirpath, formatlist):
     Repository.__init__(self)
     self.formatlist = formatlist
     self.path = dirpath
     from pypository.search.Searcher import Searcher
     self._searcher = Searcher(self)