1

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?

0

2 Answers 2

3

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)"

this will allow you to run your program and keep the window open afterward so you can analyze it's output.

2
  • 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, 2009 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, 2009 at 15:28
0

It's useful to hotkey shortcuts->run commands:

  1. open containing folder
  2. open current dir cmd

The 2nd will open a cmd.exe prompt, and cd to script's location.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy