vote up 2 vote down star
2

I am trying to run a code through Notepad++ to Python using

(attempt 1) Run, Run,C:\Python26\python.exe, Run

(attempt 2) Run, Run, C:\Python26\python26.exe $(FULL_CURRENT_PATH), Run

(attempt 1) opens the Python Command Window but it's blank and is not running the program I wrote in.

(attempt 2) doesn't do anything

any suggestions?

flag

1 Answer

vote up 1 vote down

Add the location of the Python binary to your PATH environment variable, then you can call it with just the script name.

My Computer -> Properties -> Advanced -> Environment Variables -> System Variables -> PATH -> Edit

append a semicolon to the line along with your python binary location, eg:

C:\Perl\bin;C:\Python31\bin

Then you can use this in Notepad++:

cmd /K "$(FULL_CURRENT_PATH)"

that will run your program and keep the window open afterward so you can analyze the output.

link|flag
I guess I am not understanding what you mean. How about this? I have made it run with C:\Python26\python.exe "$(FULL_CURRENT_PATH)"...I forgot the ""...but it opens and closes in a flash. I think the /k is what I need but I don't know where to put it. – Mike Nov 18 at 15:05
If you add C:\Python26 to your path you don't need it, but you can use cmd /k C:\Python26\python.exe "$(FULL_CURRENT_PATH)" – John T Nov 18 at 15:28
success!! Thanks for the help!! – Mike Nov 18 at 19:50

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.