import mathprint math.absprint getattr(math, "abs") object = mathmethod = "abs" print getattr(object, method) print type(getattr(object, method))