This post will show you how to open Python PY files in Windows 10. PY is a script file written in Python programming language. In this post, we have covered some free tools to open Python scripts in Windows 10. You can view the content of a PY file and also edit it. Thus, these can also be used as Python file editor software.
These tools also provide the feature to run PY files – but Python Interpreter has to be installed on your PC to use that feature. Alternatively, you can also use Command Prompt and Python Interpreter to run a Python script file.
Open PY Files on Windows 10
We have added 5 free Python file viewer software to open Python files:
PyCharm is a good Python IDE (Integrated Development Environment) program to open, edit, and run Python scripts. It comes with a navigation pane to open a PY file. You can also open different Python files on separate tabs in a single interface. The features that make it more useful are you can view the list of problems in a separate section and check quick fixes for them. Its debugger tool is also helpful.
Download the free open-source community edition of this software. During the installation process, it also provides the options to add it to the right-click context menu and associate Python files with it.
After opening it for the first time, you can choose a theme (light or dark) using a UI Themes plugin. You can always change the theme later using Settings. After that, you can skip the remaining plugins, create a new project, or open an existing project. Or simply open a Python file using Ctrl+Shift+N hotkey or accessing the File menu or navigation menu.
Now start the editing, debug the script, and run your Python script using its Run menu or given buttons.
PyScripter is another open-source Python IDE software to help you easily view and edit a PY script. It comes with some good features like show/hide special characters, syntax highlighting, toggle breakpoints, code folding, syntax checking, debugger hints, open a remote file by providing file name and SSH server, show/hide line numbers, use different themes, etc.
Grab the setup of this software and install it. While installing this software, you can also enable the option to integrate it with the Windows right-click menu.
Open its main interface and then you can create a new project. Or else, you can use the navigation pane or File menu to add a Python script. The tabbed interface feature is also there to open multiple scripts. You can view and edit the script in the main section and view breakpoints, variables, output, and other items in the bottom section. Apart from that, there are different menus like the Run menu to perform syntax check, run the script, etc., and buttons that you can use.
Thonny is a nice option to create a PY file, open Python files, and edit PY files on Windows 10. This open-source tool has a simple interface and it is intended to use for beginners. It comes with pre-added Python 3.7, so you can run Python script without installing a Python Interpreter separately.
Apart from that, it has many other useful features that make it a better than basic Python viewer tool. You can show/hide outlines, variables, program tree, etc., using the View menu, select Interpreter (default or other available), run script, and debug the current script using the Run menu, code completion suggestion, etc. The feature to automatically highlight syntax errors (like unclosed quotes or parentheses) is also there.
Grab this tool using this link. After opening the interface, use the File menu to create a new file or add an existing PY file. You can also open multiple Python scripts on separate tabs. After that, you just need to explore and use options present in different menus and make the most of it.
Read Also: How to install NumPy using PIP on Windows 10.
Notepad++ is a very versatile source code editor and text editor. It supports a wide range of formats to open a normal text file, programming files (like C++, C#, etc.), Java files, JSON, LaTeX, Windows PowerShell files, etc. This is also a good option to open and edit PY files. You can also check the total number of lines, selected lines, and column number where the mouse cursor is available.
This software provides syntax highlighting for PY files, tabbed interface to open multiple Python files on different tabs, start and stop macro recording, etc. You can also run a Python script using the Run menu and providing the path of the Python interpreter installed on your PC.
Grab Notepad++ from here. After downloading the portable or installer version of Notepad++, launch its, and use the File menu to add a Python file. After that, its content is visible which you can edit as per the requirement. After that, you can save the file or a copy of the Python file using the same menu.
Atom is an open-source text and code editor software which is developed by GitHub. It supports Markdown and other code files and the PY file is also supported. The interface is user-friendly where you can open multiple PY files and edit them. It comes with text selection, text auto-complete, line numbers, enable/disable tree view, code folding, increase/decrease text size, change text case, and other options.
Its download link is here. After launching it, you can open a PY file or a project. Once the file is added, you can start the editing, and use the options available in different menus. You can also change its default theme by accessing Settings using the File menu.
The settings page also helps you install packages for Python files. For example, you can search for and install the python-debugger package. After that, you can use the Packages menu and use Python file debugger by adding input arguments and debugger commands.
You can find and install more packages such as format Python code, run Python file in terminal, add docstrings to Python, etc., to make it more useful for PY script files.
These are some good tools that you can use to open Python PY files in Windows 10 PC. Though Python IDE programs are better to use, simple text and code editor tools also serve the purpose of opening PY files in Windows PC quite well. Hope these Python file viewers will help.
TIP: here are some of the best websites to learn or improve your HTML coding knowledge.
- Tags: Files