

The best plugin for running python files from Notepad++ is To solve these problems (AFAIK *) you need to use Notepad++ Plugins. Also problem with running python programs from Notepad++ is that you need to manually save your file and then click Run (or press F5). This might not be important to some, but when I started to program in python, I used Python IDLE, so I got used to running python file multiple times in same IDLE Shell window. Problem with running your python files via builtin Run option is thatĮach time you run your python file, you open new console or IDLE window and lose all output from previous executions. This will run your python program in IDLE Shell and because it is in IDLE it is by default in interactive mode. So it opens your file in IDLE Editor and then you need run it from there, which defeats the purpose of running python files from Notepad++.īut, searching online, I found option which adds '-r' to your code (links: ): C:\Path\to\Python\Lib\idlelib\idle.bat -r "$(FULL_CURRENT_PATH)" Run python program in IDLE with code something like this (links:, in these links C:\Path\to\Python\Lib\idlelib\idle.py is used, but I am using C:\Path\to\Python\Lib\idlelib\idle.bat instead, because idle.bat sets the right current working directory automatically): C:\Path\to\Python\Lib\idlelib\idle.bat "$(FULL_CURRENT_PATH)"Īctually, this doesn't run your program in IDLE Shell, but instead it opens your python file in IDLE Editor and then you need to click Run Module (or click F5) to run the program. Links: ) This works fine, and you can even run files in interactive mode by adding -i to your code (links: ). (If your console window immediately closes after running then you can add cmd /k to your code. Run python file in console (in Windows it is Command Prompt) with code something like this (links: ): C:\Path\to\Python\python.exe "$(FULL_CURRENT_PATH)"

Most common option found online is using builtin option Run. I also wanted to run python files directly from Notepad++.
