动态模块导入示例、断言


import importlib from wxpython.Frame import MyFrame aa = importlib.import_module('wxpython.Frame') print aa.MyFrame()

 断言:

assert type(obj.name) is int
原文地址:https://www.cnblogs.com/qiangayz/p/8596344.html