How to run python script on notepad++

How to  Configure Notepad++ to run a python script via python IDLE

If you are learning python and want to use notepad++ as a free as well as simple and easy to use editor, follow these simple steps:

Install python (2.x/3.x)

(this example was made for python 2.7)

First thing: Download the python 2.x/3.x windows installer from http://www.python.org/download/ using the default settings. It should install python in the folder: C:\Python27. You can use a different version of python, just substitute out the version number wherever you see 27.

Install Notepad++

Download and install the Notepad++ installer from http://notepad-plus-plus.org/download
Run the installer using the default settings for everything.
Open Notepad++

Configure Notepad++ to run a python script

  1. Open notepad ++
  2. Click run > run or press F5
  3. In the “program to run” dialog box press the three dots (…) and navigate to C:\Python27\Lib\idlelib\idle.py (or change C: to your python installation drive)
  4. Than add “$(FULL_CURRENT_PATH)” after the py so that the line will look like this:

    Python 2

    C:\Python27\Lib\idlelib\idle.py “$(FULL_CURRENT_PATH)”

    Python 3

    C:\Program Files (x86)\Python36-32\Lib\idlelib\idle.py “$(FULL_CURRENT_PATH)”


  5. Click ‘save and give the shortcut a name like ‘python IDLE’
  6. You can also select a shortcut, for example”: Alt+shift+p
    runPython
  7. Click OK
  8. Click run
  9. A new notepad window will open. (you can minimize the black command line window)
  10. hit F5 and the python shell will now open
  11. In the notepad window, write your code Save as ‘example.py’
  12. hit F5
    python in a shell
  13. Now, every time you test your modified code, you will be prompted to save the file. When hit F5 the code will run on the python command line shell, it is a very convenient way to code and simultaneously see your code run.



5 thoughts on “How to run python script on notepad++”

  1. I just have typed $(FULL_CURRENT_PATH) and it works. Thank you.

  2. If you have added python to path you can simpy put
    python $(FULL_CURRENT_PATH)
    and that works

  3. As of May 2019 (with Notepad++ 7.6.6), copy/pasting this advice can cause “ShellExecute – ERROR”. Please replace smart quotes with normal ASCII “quote marks” in the examples above. In any path that includes a space (like in the python3 example), you need to surround that path with quotes as well.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.