Scripts from Notepad++ do not run in Python/Jupyter 3.5(already read prior help discussions)
My Python scripts from Notepad++ do not run in Python/Jupyter 3.5. I have a 64 bit operating system and installed the appropriate version of Python.
On the prior help discussions it was suggested that one install the NppExport Plugin which was installed automatically with the current version of notepad++.
It also was suggested that this command be placed in the run box within notepad: cmd /K “D:\Program Files (x86)\Python\python.exe” “$(FULL_CURRENT_PATH)” I also tried placing this command in the run box in notepad: cmd /K D:\Python35\python.exe -i -c “execfile(‘$(FULL_CURRENT_PATH)’)”.
When I run both of the above commands it opens up a black python window with the following message: The device is not ready and the next line gives me a command prompt with C:\Program Files (X86)\Notepad++>. On the upper menu bar it has Select C:\Windows\ System32\cmd.exe.
It doesn’t import the notepad script into python or run it. It is unclear to me how to fix this as I have python open at the time so it looks ready to me. I also haven’t seen this error message in the prior help requests on this forum. Please help me fix this. Thank you.
Sorry, you cannot get the same error message on all 4 runs.
The message “the system CANNOT find the path specified.” is descriptive isn’t it.
I start thinking you are trolling.
Your right. 1. from above doesn’t give me the same output as the others but just shows “run…” in the dialogue box. It was sloppy of me to post that.
I am a novice at programming, not a troll. I am trying to learn programming. I can understand if you run out of patience trying to help me with this as the amount of times that I have tried to fix this is also trying my patience. I did not plan on spending since yesterday trying to get notepad++ to communicate with python but rather to learn how to use python. Can you suggest any basic resources that I can look at to learn how to fix this?
Thanks for all of your help
Scott, we can get this work in maybe 2-3 posts if you would describe step by step what you do
instead of writing “I did what you do”, because any slight modification could break it.
What do you want to do?
I assume you want to run python with the current script you have open with notepad++.
What do you use to execute the script?
I assume you use the Run dialog from the run menu and not the nppexec plugin.
I would suggest you use the nppexec plugin.
- Find out where your python.exe is located. We need to know the directory.
- Press F6 to open the nppexec dialog
- put the the following into the dialog opened by pressing F6
cd PATH_OF_THE_DIRECTORY_WHERE_YOUR_PYTHON_EXE_IS python "$(FULL_CURRENT_PATH)"
- Press ok
A console opens and either shows the expected result or an error.
If an error appears copy it and post it then we see what is going on.
Do not interpret it - copy the real output.
If there is sensitive data in it - replace it with question marks - but only that part.
Here is my solution.
- uninstall anaconda
- install python 3.6 in c:\python36
- do an “hello world” script to test
4 append to the end of script os.system(“pause”) in order to pause your script and be able to read the result
import os print("Hello World") os.system("pause")
5 run your script with “notepad++ run” command
Here is what i got
@scott-grossberg any news ?
I followed your suggestion of removing anaconda and installing python directly and I can run notepad++ scripts in python (I tested this with the hello world program). Unfortunately the class that I am using this for has extra formatting in the scripts since they were saved as a python notebook. Therefore I get an error message when I try to run these scripts with notepad++ with my current set up. This is the error message:
C:\Anaconda\python.exe “C:\Users\scott grossberg\Downloads\controlflow_demo_test”
Process started >>>
Traceback (most recent call last):
File “C:\Users\scott grossberg\Downloads\controlflow_demo_test”, line 21, in <module>
NameError: name ‘null’ is not defined
<<< Process finished. (Exit code 1)
I placed the command below into the run box (I saved Anaconda to C:\Anaconda) as well as within the box when I hit the f6 key and it successfully runs the hello world program above in python and the lower console box respectively:
Do you know how I can get the notepad++ script to run in the jupyter notebook?
Thank you very much for the help.
Thank you very much for the help.================ READY ================
I should have mentioned in the above post that after I successfully installed and tested the notepad++ and the python 3.6 integration I removed python 3.6 and re-installed Anaconda. I did this to try to get notepad++ to run the scripts in the python notebook rather than directly on python.
I greatly appreciate all of your help.
Sorry I don’t know Jupiter and I didn’t understood your issue.
I greatly appreciate your help as you showed me how to integrate notepad++ and python.
Does anyone know how to run notepad++ scripts in python/ jupyter?
Jupyter as the successor of IPython?
If so, isn’t it just a better python shell??
So copy and paste should work - but I assume you want to do something different.
You should keep original Python then install Jupyter with ‘pip installer’ that is provided with python