目录结构如下:
p_test.py 代码
1 # -*- coding: utf-8 -*- 2 # Author = 'csy' 3 import package_test
import package_test 本质是导入该包下的__init__.py文件
package_test文件夹下__init__.py代码
1 # -*- coding: utf-8 -*- 2 # Author = 'csy' 3 print("hahaha")