how to call a function on a string code example Example: python get function from string name module = __import__('foo') func = getattr(module, 'bar') func()