class test(object): def show(self): print 'I am show' def talk(self): print 'I am talk' method = 'show' getattr(test(), method)()