Can Notepad++ compile and execute Python code? Well technically yes, we can make it do that. Let's see how, before starting let's know what Notepad++ is, you can skip this part if you are already aware of this tool.
What is Notepad++
Notepad++ is an open source text editor which is able to do a lot more than just editing texts, Notepad++ can,
- Can do Syntax highlighting for various programming languages and file types, Python too :)
- It can be used to edit multiple text files at a time.
- it will autosave the files for you, even the once whom you did not save as drafts.
- It will guide you to indent your code, with Python its really very important.
- It have as very powerful Find and Replace text options with support for regular expressions.
- Has support for Macros
- Provides various line operations such as sorting based on alpahabets, case conversion uppercase, lowercase, camel case, sentence case e.t.c
- And yes, there are loads of plugins that you can make use of.
So Notepad++ is mostly a "developer friendly text editor", useful for coders!. You can create shortcuts that can help you execute Pyton.exe that will inturn compile and execute your code.
How to download and install Notepad++
Note that Notepad++ is only supported on Windows Operation system if you are using Unix, Linux or macOS you do not have Notepad++ support. In order to download Notepad++ go to their official download page: https://notepad-plus-plus.org/downloads/ and download a 64bit setup (I hope by now everyone is using 64bit operating systems 😊), just follow the simple instructions and get it installed.
How to Syntax highlight Python Code in Notepad++
You can save files as .py and you would see that they getting highlighted, or go to Menu: Languages -> P -> Python, see the demo gif example below,
How to run Python code in Notepad++
- Open a .py code file that you want to run
- Now press F5 to open Run.
- Type in the python.exe file path: example C:\Users\C2c\AppData\Local\Programs\Python\Python38-32\python.exe
- Append "$(FULL_CURRENT_PATH)" at the end with quotes, example C:\Users\C2c\AppData\Local\Programs\Python\Python38-32\python.exe "$(FULL_CURRENT_PATH)"
- Now Press Run, you code will get executed.
- How to hide toolbar on Notepad++
- Change the default Line Encoding Notepad++ (CR LF)
- Notepad++ is about to exit prompt message
- How to force quit or kill Notepad++ Process
- Add Blank Lines Between Each Lines in Notepad++
- Install Notepad++ silently using Windows Powershell
- Prettify JSON in Notepad++
- Notepad++ Convert text from lower to upper case
- Must have CSV Plugins for Notepad++
- How to lock Notepad++ tabs?
- Column Mode Editing in Notepad++
- How to change background color in Notepad++
- Notepad++ sort by name with example
- How to rename a tab in Notepad++
- [Solved] Notepad++ Menu Bar Missing
- Where are Notepad++ temp unsaved files stored?
- Notepad++: How to add Quotes to CSV File
- How to check about details of Notepad++ text editor
- How to close all tabs of Notepad++?
- How choose alternate Tab Bar icon in Notepad++
- How to copy file name and path to clipboard in Notepad++
- Change default language highlighting in Notepad++
- Add Line Number before each line in Notepad++ using Column Editor
- Go to Line Number option in Windows Notepad
- How to show End of Line Characters in File using Notepad++
- Simple Struts 2 Tutorial in eclipse with tomcat 7 server - Java
- BeanDefinitionStoreException IOException parsing XML document from class path resource [spring.xml] - Java
- Difference between Sublime Text vs Visual Studio Code (VS Code) - Sublime-Text
- How to Get Year from a Date in Java - Java
- 9 Ways to Loop Java Map (HashMap) with Code Examples - Java
- Git: Step-by-Step - How to Push Local Brach to GitHub - Git
- Steps to Compare Two files in Sublime Text Side-by-Side - Sublime-Text
- How to access Trash Folder using Mac Terminal Command - MacOS