在python3中:
调用python path/to/file.py
和python -m path.to.file
吗?
它如何影响工作目录? (os.getcwd()
)
它是否存在__init__.py
存在的链接文件位于path/to
吗?
我对在这些问题上发现的信息很少感到惊讶。也许我搜索的字词不正确?预先感谢!
python -m ...
用于运行python库模块,例如pip,IPython等。>
python file.py
但是用于通过python解释器运行文件。