Member Avatar

Hi I am trying to get python to run from notepad++. When I go to run in notepad++ and select python.exe in default folder C:\Program Files\Python27\python.exe

It does not execute. Nothing happens. However if I save the .py file and double click it the program will execute, why can't I do it directly from Notepad++?

Recommended Answers

All 4 Replies

It's a little clumsy since the output is in cmd.exe window.
Here is how you do it:
load the python file you want to run
click the run tab run
in the edit area type for instance
C:\Python27\python.exe -u $(FULL_CURRENT_PATH)
and run the command

If your code is a tkinter program it works fine, but console programs need
a wait line at the end, something like:
raw_input("Press enter to go on ... ")

The unfortunate thing is that any traceback error messages are simply swallowed up.

You would be better off to use a Python IDE like IDLE (comes with Python) or Eric5.
Notepad++ is more geared for html development.

Member Avatar

You could use netbeans, it allows you to run python programs right from the text editor window.

Member Avatar

(Alt + Shift) + F5 saved my life. I am new to this too and this command combination works for me. (I have Notepad++ Python Script( installed and checked the Python plugins installed.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.