A few problems with this. When I do the search, it's to find areas with in the files for me to look at. This means I need file name and line number of the relevant results, and this method doesn't give me either of them. Also, I'm getting lines put into the window that don't include the search term. Doing a search for *resist* pulled up (among other things) the following.

Code:
    def getDBSpawn(name):
        return DBDict.getDBDict('Spawn','name',name)
    
    getDBSpawn = staticmethod(getDBSpawn)

    def addSpell(self,spellname):
        self.spawnSpells.append(spellname)
        
    def addFaction(self,faction):
        self.factions.append(faction)

Is there a way to use filter to include the information I'm after, and skip the lines I'm not interested in? I don't need every line from what ever file it finds a mention of the search term in, just enough to let me know if the line is what I'm after, the file it's in, and what line to begin looking at.