DEV Community

Pizofreude
Pizofreude

Posted on • Edited on

Full Notepad++ Setup for Python

If the Quick Notepad++ Setup for Python isn't your cup of tea, here's a full-blown setup you can try to make it world whole again as a Python dev.

Step 1

Verify Python installation on the system. Open cmd and type:

python --version
Enter fullscreen mode Exit fullscreen mode

If python is not yet installed, get it here.

Step 2

Install "NppExec" plugin inside notepad++. (Skip this if you already done it)

Step 3

Go to "plugins" --> "NppExec" --> click on "Execute"

When the command window pops up, add the following script and save it with a new name.

NPP_SAVE
cd $(CURRENT_DIRECTORY)
python $(FILE_NAME)
Enter fullscreen mode Exit fullscreen mode

Step 4

Create menu item and hotkey to run the python program:

Go to "plugins" --> "NppExec" --> click on "Advanced options"

Then, go to "settings" --> "shortcutmapper" and follow the instructions to create a shortcut.

Step 5

Test run any python program and voila!

Top comments (0)