You are on page 1of 1

Python Scripts May Have One of Several File Extensions.

Each File Extension Has A


Special Meaning And Purpose:
 *.py - Regular scripts
 *.py3 - (rarely used) Python3 script; Python3 scripts usually end with "*.py"
not "*.py3"
 *.pyc - compiled script (Bytecode)
 *.pyo - optimized pyc bytecode file (As of Python3.5, Python will only use
pyc rather than pyo and pyc)
 *.pyw - Python script for Windows that is executed with pythonw.exe
 *.pyx - Cython src to be converted to C/C++
 *.pyd - Python script made as a Windows DLL
 *.pxd - Cython script which is equivalent to a C/C++ header
 *.pyi - MyPy stub
 *.pyi - Stub file (PEP 484)
 *.pyz - Python script archive (PEP 441); this is a script containing
compressed Python scripts (ZIP) in binary form after the standard Python script
header
 *.pywz - Python script archive for MS-Windows (PEP 441); this is a script
containing compressed Python scripts (ZIP) in binary form after the standard
Python script header

 *.py[cod] - wildcard notation in ".gitignore" that means the file may be


"*.pyc", "*.pyo", or "*.pyd"
 *.rpy - RPython script or a Python script containing application or
framework-specific features
 *.pyde - Python script used by Processing (https://processing.org/)
 *.pyp - Py4D Python Plugin
 *.pyt - Python declaration file
 *.xpy - Unknown
 *.ipynb - Jupyter Notebook file

You might also like