python动态加载模块,并获取模块中的类与方法(类似反射)

temp.py: def func(): print('func is called.') class A: def __init__(self,name='A'): self.name=name def _say(self,msg): print(msg) def sayhello(self):
posted @ 2021-01-20 11:04  morein2008  阅读(1378)  评论(0编辑  收藏  举报