通过字符串导入模块

import importlib
ret = importlib.import_module('模块字符串')
原文地址:https://www.cnblogs.com/LYliangying/p/9935456.html