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.
Download and install the Notepad++ installer from http://notepad-plus-plus.org/download
Run the installer using the default settings for everything.
Configure Notepad++ to run a python script
- Open notepad ++
- Click run > run or press F5
- 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)
- Than add “$(FULL_CURRENT_PATH)” after the py so that the line will look like this:
- Click ‘save and give the shortcut a name like ‘python IDLE’
- You can also select a shortcut, for example”: Alt+shift+p
- Click OK
- Click run
- A new notepad window will open. (you can minimize the black command line window)
- hit F5 and the python shell will now open
- In the notepad window, write your code Save as ‘example.py’
- hit F5
- 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.