I know, I know, I'm using Windows. But it's just temporary, I just felt like playing some video games. Anyway, Notepad++ is awesome, I must say. And I wanted to use it for Python developing (I hate that IDLE Python comes with). To set up Notepad++ for Python developing I had to:
- Create a batch script that would run a python script and then wait for a key (so that the terminal (or, command line) doesn't disappear);
- Configure a shortcut in Notepad++ to run that script with the current file as parameter.
First things first: the batch script. Pretty basic, I just looked at a couple of Wikipedia articles and another one about using arguments in batch scripts:
@ECHO OFF
C:\Python26\python.exe "%1"
echo.
PAUSE
@ECHO ON
Then, in Notepad++, I went to
Run → Run..., type in
C:\Python26\python.bat "$(FULL_CURRENT_PATH)", then
Save... and assign a shortcut. Press that shortcut now with a python file opened and
boom goes the dynamite. Enjoy :)
This is exactly what I am looking for.
ReplyDeleteThanks! Btw, I had to remove the quotation marks in the batch file, but I'm a n00b so I'm not sure why. Using Python 3.1, Notepad 5.6.4, XP.
ReplyDeleteAwesome. Thanks!
ReplyDeleteThank you so much been looking for this!
ReplyDeleteWorks like a charm. Much appreciated.
ReplyDeleteThis is great, thanks! exactly what i needed!
ReplyDeleteStill helping! Thank you!
ReplyDeleteThank you very much, simple, effective and efficient. No more IDLE!
ReplyDeleteAwesome! Thanks :-)
ReplyDeleteDitto! thank you!
ReplyDeleteI setup notepad++ using these settings long ago. At one point I lost my configuration information, and forgot how I'd set things up to pause when running python scripts. I'm glad I rediscovered this page as I'm up and running again. Don't ever let this page disappear. THANKS!
ReplyDeleteBrilliant, thank you x 100
ReplyDeleteThe changing to a bat file to prevent the closing was what I was missing - thanks for the post!
ReplyDeleteThanks for the tip. Very convenient. :)
ReplyDeleteAwesome tip! Thanks!
ReplyDeleteNice one!
ReplyDelete