Hi; I have the following code that execute without a problem: import sys,os sys.path.append(os.getcwd()) import options storesTables = [] junkStores = string.join(addStore(), ', ') for table in optionsTables(): if table not in ('particulars', junkStores): storesTables.append(table) for table in storesTables: try: fn = getattr(options, table) print fn() except: pass
I need to change the obvious line to this or something similar (that actually works): fn = getattr(options, '%s("names")' % table) That is, I need to pass the variable "names" to each table as it is called. How do I do this? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list