Python文件类型

1.Python如何执行.py文件的?

Python文件类型


2.Python的两种字节码文件

Python文件类型


01.Linux下.pyc文件生成命令.

 python  -m py_compile hello.py

.pyc与源文件对比,能提高程序的加载效率,但不能提高运行效率,也就是说他们的运行效率是一样的

02.Linux下.pyo文件生成命令.

 python - o -m py_compile hello.py