动态模块导入示例、断言


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

 断言:

assert type(obj.name) is int

 

posted @ 2018-03-18 17:26  梦中琴歌  阅读(135)  评论(0编辑  收藏  举报