1.py文件是如何被执行的?
xx.py -> python解释器 -> 字节码文件 -> python解释器 -> 二进制文件 -> 加载到内存、运行
字节码文件:
- pyc
python -m py_compile hello.py 命令可以根据.py文件生成.pyc文件;
python hello.pyc可以直接运行; - pyo
python -O -m py_compile hello.py 命令可以根据.py文件生成.pyo文件;
python hello.pyo可以直接运行;
1.py文件是如何被执行的?
xx.py -> python解释器 -> 字节码文件 -> python解释器 -> 二进制文件 -> 加载到内存、运行
字节码文件:
本文标题:note-1——python相关文件
本文链接:https://www.haomeiwen.com/subject/wxanwftx.html
网友评论