专业财税服务推荐

精选优质财税服务,为企业提供专业、可靠的财税解决方案,助力企业健康发展

零报税代理记账
零申报代理记账
报税做账算帐财务报表老会计做账
代理记账
咨询微信:lhy_happyday
工商营业执照年度年报年检公示
全国个体、企业、公司、合作社工商年审年报服务!
个体/10元/次 企业/20元/次
咨询微信:lhy_happyday
财税咨询服务
一对一专业财税咨询,解决企业财税难题,提供定制方案
咨询微信:lhy_happyday
财务分析服务
小规模个体报税0申报税务年报工商年报月报季报报税代理记账
咨询微信:lhy_happyday
立即咨询专业财税顾问
微信号: lhy_happyday
会计从业9年,管理多家个体工商、小规模、一般纳税人等企业的财务、税务等相关工作!。
扫码或搜索添加微信,备注"财税咨询"获取专属优惠
知方号 知方号

What is the suffix of python files? python语言源程序文件的扩展名通常为

The suffix names of python files are: ".py", ".py3", ".pyc", ".pyo", ".pyd", ".pyi", ".pyx", ". pyz", ".pywz", ".rpy", ".pyde", ".pyp", ".pyt".

Python file suffix summary:

(1).py:

Expanded with py The file named is a Python source code file, which is interpreted by python.exe and can be run under the console. Can be read and written with a text editor.

(2).py3:

Python3 script (Python3 scripts usually end with .py instead of .py3 and are rarely used).

(3).pyc:

The pyc extension is the compiled file of Python. It executes faster than py files and cannot be edited and viewed with text editing. So pyc files are often released instead of py files.

When Python is executed, it will first compile the source code in the py file into PyCodeObject and write it into the pyc file, and then the virtual machine will execute PyCodeObject. When Python executes import, it will first look for the corresponding pyc or pyd (dll) file. If not, the corresponding py file will be compiled and written into the pyc file. pyc files can also be generated by python -m py_compile src.py.

.pyc binary files can be decompiled into .py files, and the decompilation software is called Easy Python Decompiler.

(4).pyo:

pyo is an optimized and compiled program and cannot be edited with a text editor. python -O source.py can compile the source program into a pyo file.

This is the *.pyc file created when optimizing (-O). Starting from Python3.5, Python will only use .pyc instead of .pyo and .pyc.

(5).pyd:

This is basically a Windows DLL file.

pyd is generally a Python extension module written in other languages ​​other than Python, such as C/C. It is a dynamic link library of Python, which is equivalent to a dll file. In Linux systems, it is generally a .so file

(6).pyi:

MyPy stub, stub file (PEP 484).

(7).pyw:

Windows Python script executed with pythonw.exe.

The pyw file is similar to the pyc file, but the console window will not appear when pyw ​​is executed. When developing (pure graphical interface program), you can temporarily change pyw to py to bring up the console window for debugging.

(8).pyx:

Convert Cython src to C/C.

(9).pyz:

Python Script Archive (PEP 441) (this is a script that contains a compressed Python script (ZIP) in binary form after the standard Python script header).

(10).pywz:

Python Script Archive for MS-Windows (PEP 441) (This is a compressed Python script (ZIP) containing the binary form after the standard Python script header ) script).

(11).py[cod]: The wildcard character in

.gitignore indicates that the file may be .pyc, .pyo, or .pyd.

(12).rpy:

An RPython script or Python script that contains application or framework specific functionality.

(13).pyde:

The Python script used for processing.

(14).pyp:

Py4D Python plug-in.

(15).pyt:

Python declaration file.

Recommended learning: Python video tutorial

The above is the detailed content of What is the suffix of python files?. For more information, please follow other related articles on the PHP Chinese website!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lizi9903@foxmail.com举报,一经查实,本站将立刻删除。