. Advertisement .
..3..
. Advertisement .
..4..
Many have struggled with utilizing Notepad++ to run Python. Are you one of them? This post will help you solve this problem.
Notepad++ is an excellent text editor for developing and running code due to its compatibility with several programming languages, such as Java, Python, etc. In addition to syntax highlighting, this editor provides a few other capabilities that are very helpful for programmers.
Method 1: Utilizing Option Run In Notepad++ To Run Python
You must select the option Run in the menu of the Notepad++ editor before running your Python file. Then, choose Run… (the first one in the dropdown menu).
......... ADVERTISEMENT .........
..8..
You will see a new window appear on your screen as below. As an alternative, you may also access this window by using the key F5 on your keyboard.
......... ADVERTISEMENT .........
..8..
Enter the following command in the dialog box The Program to Run, and hit Run.
C:\Python39\python.exe -i "$(FULL_CURRENT_PATH)"
The C:\Python39\python.exe parameter specifies Python’s installation location on the computer. Meanwhile, the final component is the path to the file you wish to launch. Keep in mind that you do not need to specify the path of the file; Python will figure it out for you using $(FULL_CURRENT_PATH).
......... ADVERTISEMENT .........
..8..
Notice that the option –i is uncompelled in this case. Utilize this option if you want the command line window to remain active even after the file has finished running. It will then launch a command line window where your file will be run, as seen in the illustration below.
......... ADVERTISEMENT .........
..8..
Method 2: Utilizing PyNPP Plugin In Notepad++ To Run Python
Additionally, Python applications in text editor Notepad++ can be launched via the PyNPP plugin. To begin, navigate to Plugins and choose Plugins Admin… in the dropdown bar.
......... ADVERTISEMENT .........
..8..
As displayed below, a dialog window will appear. Enter the plugin PyNPP into the search box. Here, you will find a list with the name of each plugin and its version number. Check the box next to the name of the plugin PyNPP.
......... ADVERTISEMENT .........
..8..
Next, select the button Install located in the dialog box’s upper right corner.
......... ADVERTISEMENT .........
..8..
When a new box appears, continue to select Yes. By doing this, you can install the plugin PyNPP and reopen the Notepad++ text editor.
......... ADVERTISEMENT .........
..8..
After successfully installing the plugin, you may now open the file by simultaneously hitting the Alt, Shift, and F5 buttons on the keyboard. As you do this, a new terminal box will open and display the file’s output as displayed below.
......... ADVERTISEMENT .........
..8..
The Bottom Line
Now you know how to utilize Notepad++ to run Python. As you can see, the procedure is quite simple to execute; continue honing your skills until you are proficient in these methods.
Bonus: Here are some more tutorials on how to parallel for loop and simulate the which command for you to check out to gain more skills in Python.
Leave a comment