calling a function of a class instance in python by name code example
Example: python calling dynamic function on object
obj = MyClass()
try:
func = getattr(obj, "dostuff")
func()
except AttributeError:
print "dostuff not found"
obj = MyClass()
try:
func = getattr(obj, "dostuff")
func()
except AttributeError:
print "dostuff not found"