def __init__(self, initialDatabaseFile): # Load and generate the pattern trees databaseFile = open(initialDatabaseFile) contents = databaseFile.read() databaseFile.close() self.parserTree = database.parse(contents)
def setPatternDatabase(self, filePath): databaseFile = open(filePath) contents = databaseFile.read() databaseFile.close() self.parserTree = database.parse(contents, filePath)