import importlib
o = importlib.import_module("xx.oo")
s2 = "Person"
the_class = getattr(o,"Person")
the_class()
转载于:https://www.cnblogs.com/bozhengheng/p/10577461.html
import importlib
o = importlib.import_module("xx.oo")
s2 = "Person"
the_class = getattr(o,"Person")
the_class()
转载于:https://www.cnblogs.com/bozhengheng/p/10577461.html