How to run Python Program in Notepad++ ?
Вставка
- Опубліковано 9 лис 2024
- In this tutorial session, we will learn to run a python program in Notepad++, also you will learn to create a shortcut key to run the python program.
Step 1: first check python is installed on the system.
open cmd and type python --version
If python not installed,
Please watch this tutorial for installation:
link- • Setting up Python Deve... (follow steps 1 and 2 from this tutorial to install python)
Step 2: Install new plugin "NppExec" inside notepad++. (if already installed, ignore this step)
Step 3: go to plugins -- NppExec -- click on Execute
Here is the command window. we will add the following script and save it with a new name.
NPP_SAVE
cd $(CURRENT_DIRECTORY)
python $(FILE_NAME)
Step 4: Create menu item and shortcut key to run python program:
go to plugins -- NppExec -- click on Advanced options
Now Go to settings --shortcutmapper and follow my instructions to create a shortcut.
Step 5: sample python program and test run.
Step 6: Seems working! Please Like this tutorial and Subscribe to learn more.
If you found this video tutorial useful and would like to support me, you can do so by buying me a coffee using the below link!
buymeacoffee.c...
#RunPythonNotepad++ #CoolITHelp #PythonRunNotepad++
For anyone confused as to why the execute option is not there, in the current version it is now called "Execute NPPexec Script"
Thank you
I just started to program on Notpad++ and this video was so useful.
I AM GETTING THIS ERROR WHEN I RUN IT =
Current directory: C:\Program Files\Python39
python: can't open file 'C:\Program Files\Python39\hello': [Errno 2] No such file or directory
try with:
NPP_SAVE
cd $(CURRENT_DIRECTORY)
python.exe "$(FILE_NAME)
@@danieldiazstabilito3381 perfect - thanks
absolute legit
if someone couldn't do it
try again
Thanks for the help! the only issue im running into is Notepad++ says "The sum of 1.5 and 6.3 is " whenever i run the program, not sure why the sum isnt working but the rest of it is
Thank you so much. I've been breaking my head for 2 days. Got it
You are a wonderful teacher with a beautiful timbre of voice. Thank you for your help.
You're very welcome!
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
getting like this
same
This tutorial is very helpful. Thank you very much for this video.
So without installing Vs video code can we run the Notepad++?
The tutorial is definitely helpful! Thank you!
Thanks you helped me a lot
Glad to hear that!
( [Errno 2] No such file or directory) i faced these issues. Can you please help me?
WHAT IS NPPEXEC AND WHY CANT I FIND IT?
If that script doesn't work, here is the second one:
npp_console local - // disable any output to the Console
npp_save // save current file (a .py file is expected)
cd "$(CURRENT_DIRECTORY)" // use the current file's dir
set local @exit_cmd_silent = exit() // allows to exit Python automatically
env_set local PATH = $(SYS.PATH);C:\Python27 // using Python 2.7
npp_setfocus con // set the focus to the Console
npp_console local + // enable output to the Console
python -i -u "$(FILE_NAME)" // run Python's program interactively
Thank you very much, very useful video 😃
Helpful! I have used it! Thank you!
Thank you, really helpful.
U are very good tutor
Love u bro
Finally something useful..👍
This is amazing😊
REALLY THANK YOU SIR
Thanks a lot it is very helpful👍
it really works, thankyou
thank you,it worked )
thank you so much
Thank you..
It's easier to run from cmd, Heck, file explorer even.
great
perfect tutorial
Doesn't work.
Waaooo
helpful tnx