python 模块和包

一.模块

1. import

2. from ...import...

3. 把模块当作脚本执行

4.模块搜索路径

5.编译python文件

二.包

1. import

2. from...import...

3. __init__.py文件

4. from glance.api import *

5. 绝对导入和相对导入

6. 单独导入包

原文地址:https://www.cnblogs.com/zhuzhaoyang/p/8510903.html