Python的插件化开发概述

                           作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

一.插件化开发

动态导入:
    运行时,根据用户需求(提供字符串),找到模块的资源动态加载起来。

1>.内建函数“__import__() ”

1 #!/usr/bin/env python
2 #_*_conding:utf-8_*_
3 #@author :yinzhengjie
4 #blog:http://www.cnblogs.com/yinzhengjie
5 
6 class A:
7     def showme(self):
8         print("I am A")
test01.py文件内容

相关文章:

  • 2021-08-30
  • 2021-11-13
  • 2022-01-31
  • 2022-12-23
  • 2021-07-02
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-08-04
  • 2021-11-30
相关资源
相似解决方案