python importlib
2024-10-01 21:00:44
api 文档
importlib.import_module(name, package=None)
Import a module. The name argument specifies what module to import in absolute or relative terms (e.g. either pkg.mod or ..mod). If the name is specified in relative terms, then the package argument must be specified to the package which is to act as the anchor for resolving the package name (e.g. import_module('..mod', 'pkg.subpkg') will import pkg.mod). The specified module will be inserted into sys.modules and returned.
>>> import importlib
>>> s = importlib.import_module('os.path')
>>> s
<module 'ntpath' from 'D:\software\python2.7\lib\ntpath.pyc'>
>>> s
最新文章
- Hibernate之加载策略(延迟加载与即时加载)和抓取策略(fetch)
- Sweet Alert
- Struts2(十)OGNL标签二与Struts2标签
- Redis使用介绍
- 《Java核心技术卷一》笔记 多线程
- [http] http缓存机制
- Clean Code第二章<;命名>;
- I.MX6 Power off register hacking
- Linux设置禁止用户登陆
- android 的异步任务
- Mysql 进阶操作
- SolrCloud阶段总结
- Jquery时间验证和转换工具
- input type=passoord 密码框的明密文(显示和隐藏) 显示
- C# LINQ语法详解
- 解决STM32 I2C接口死锁在BUSY状态的方法讨论
- CSS3的媒体查询(Media Queries)与移动设备显示尺寸大全
- How To Install WildFly as a Service on Linux
- 常用 shell 命令
- springmvc静态资源无法加载