python folder/test.py
python -m folder.test
不同的加载py文件的方式,主要是影响sys.path这个属性。sys.path相当于Linux中的PATH
这就是当前Python解析器运行的环境,Python解析器会在这些目录下去寻找依赖库。
充分理解 python -m mod
https://blog.csdn.net/zelinhehe/article/details/79631198
python folder/test.py
python -m folder.test
不同的加载py文件的方式,主要是影响sys.path这个属性。sys.path相当于Linux中的PATH
这就是当前Python解析器运行的环境,Python解析器会在这些目录下去寻找依赖库。
充分理解 python -m mod
https://blog.csdn.net/zelinhehe/article/details/79631198