We have a config.ini file with methods associated to tables, something like this:
[assoc] people = getPeopleTable food = getFoodTable
in our main program we instantiate a database object and we call them like this:
output = getattr(self.db, 'getTable')(config.get('assoc',table))
and in our database class we have the methods to fetch each table, and,
getTable, which looks like:
def getTable(self, table): table = getattr(self, table)() return table
Is this by any chance a type of design pattern? Sorry if it seems stupid, this subject is new to me.