Your email address belongs to a school and you are eligible for a free educational premium account.
Learn more

PY - Python Script

What is a PY file

PY files are created to save scripts or other program-associated files that have been coded in the Python programming language. These PY files can be easily opened and edited with any given text-editor even though it's advised to use a text editor that features syntax highlighting. PY files are quite popular due to the programming language's versatility. Python provides an extensive library and supports the integration of tools written in other programming languages.

While PY files can be opened and viewed, even edited, in normal text editors, another kind of program is needed to execute the scripts inside the file. To run a PY file, a Python interpreter is needed. Script files written in Python are typically used for administrative purposes like programming servers on the web.

Here's a small, but not exhaustive list of programs that can open PY documents:

  • gedit (Linux)
  • GNU Emacs (Linux)
  • MacroMates TextMate (Mac)
  • Microsoft Notepad (Windows)
  • Notepad++ (Windows)
  • Python Software Foundation Python (Windows, Mac & Linux)
  • Other text editor
About
Extension PY
MIME type application/x-python, text/plain, application/octet-stream, text/x-python
Useful links