func_list= ["function1", "function2", "function3"] class doit(object): def __init__(self): for item in func_list: getattr(self, item)() def function1(self): print "f1" def function2(self): print "f2" def function3(self): print "f3" >>> doit() f1 f2 f3 For also private functions:
for item in func_list: if item.startswith('__'): getattr(self, '_' + self.__class__.__name__+ item)() else: getattr(self, item)() .
getattr(object, name[, default]) Return the value of the named attribute of object. name must be a string. If the string is the name of one of the object’s attributes, the result is the value of that attribute. For example, getattr(x, 'foobar') is equivalent to x.foobar. If the named attribute does not exist, default is returned if provided, otherwise AttributeError is raised.