Python - How to invoke an function on an object dynamically by name?
In python, say I have a string that contains the name of a class function that I know a particular object will have, how can I invoke it?

That is:

    obj = MyClass() # this class has a method doStuff()
    func = "doStuff"
    # how to call obj.doStuff() using the func variable?
Python - How to invoke an function on an object dynamically by name?
===

In python, say I have a string that contains the name of a class function that I know a particular object will have, how can I invoke it?

That is:

    obj = MyClass() # this class has a method doStuff()
    func = "doStuff"
    # how to call obj.doStuff() using the func variable?