--- cdli/cdli_files.py 2007/11/27 10:12:58 1.80.2.8 +++ cdli/cdli_files.py 2007/11/27 10:27:39 1.80.2.9 @@ -2190,9 +2190,13 @@ class CDLIRoot(Folder): def showWordInFiles(self,fileIds,word,indexName='graphemes',regExp=False): - """get lines with word from all ids in list FileIds""" - logging.debug("showwordinfiles word='%s' index=%s file=%s"%(word,indexName,fileIds)) - return [self.showWordInFile(id, word, indexName, regExp) for id in fileIds] + """ + get lines with word from all ids in list FileIds. + returns dict with id:lines pairs. + """ + logging.debug("showwordinfiles word='%s' index=%s file=%s"%(word,indexName,fileIds)) + + return dict([(id,self.showWordInFile(id, word, indexName, regExp)) for id in fileIds]) def tagWordInFile(self,fileId,word,indexName='graphemes',regExp=False): @@ -2248,9 +2252,12 @@ class CDLIRoot(Folder): def tagWordInFiles(self,fileIds,word,indexName='graphemes',regExp=False): - """get texts with word from all ids in list FileIds""" + """ + get texts with highlighted word from all ids in list FileIds. + returns dict with id:text pairs. + """ logging.debug("tagwordinfiles word='%s' index=%s file=%s"%(word,indexName,fileIds)) - return [self.tagWordInFile(id, word, indexName, regExp) for id in fileIds] + return dict([(id,self.tagWordInFile(id, word, indexName, regExp)) for id in fileIds]) def URLquote(self,str):