python动态加载类和方法 发表于 2014-03-25 更新于 2024-09-19 1234567def _importCls(self,model,action,params): obj = __import__(model) entrance = getattr(obj,action) if params == '': entrance() else: entrance(params)