0% found this document useful (0 votes)
38 views1 page

Python File Extensions

Python scripts can have various file extensions that indicate the script's purpose, such as *.py for regular scripts, *.pyc for compiled bytecode, and *.pyd for scripts made as Windows DLLs. Some other extensions include *.pyx for Cython source files, *.pxd for Cython header files, *.pyi for MyPy stubs, and *.ipynb for Jupyter Notebook files. The file extensions help determine how a Python file should be interpreted and executed.

Uploaded by

kalyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Python File Extensions

Python scripts can have various file extensions that indicate the script's purpose, such as *.py for regular scripts, *.pyc for compiled bytecode, and *.pyd for scripts made as Windows DLLs. Some other extensions include *.pyx for Cython source files, *.pxd for Cython header files, *.pyi for MyPy stubs, and *.ipynb for Jupyter Notebook files. The file extensions help determine how a Python file should be interpreted and executed.

Uploaded by

kalyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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