Running Python With Notepad++ [duplicate] - python

This question already has answers here:
How to Execute a Python Script in Notepad++?
(21 answers)
Closed 5 years ago.
I have notepad++ version v6.9.1 and python 3.5 (32 bit). Running Windows 10. I need to be able to run my python code, but when I try to download the PyNPP plugin (this is what I use at school) it gives me and error message saying the it isn't compatible with the version of NPP.

You don't need a plugin to run Python code from NotePad++.
Just press F5 and then depending on the location of Python you will type:
C:\Python32\python.exe "$(FULL_CURRENT_PATH)"
Of course, you will have to replace C:\Python32\python.exe with the location of your Python installation.
You can also save this as a keyboard shortcut, just click save, and input the keyboard shortcut you would like to use.

Related

Using Command Prompt to access python [duplicate]

This question already has answers here:
How do I run a Python program in the Command Prompt in Windows 7?
(24 answers)
Closed 1 year ago.
I want to do is create a new python script so that I can start coding in python.
I am new to using windows command prompt. How can I access and create a new python script using the command prompt window? I have tried using cd (location of already made script). I have also just used data\scripts which is where the rest of the python scripts are located.
I have also attached a screenshot of what I attempted.
To access this in the CMD, you just need to type:-
cd data\scripts
Then you will be in your directory.
If you just want shell access, type:-
python
in the interface.

Why is the windows cmd not working for me? [duplicate]

This question already has answers here:
"python" not recognized as a command
(14 answers)
Closed 3 years ago.
While on windows cmd I am coding
C:/Users/Esteban Oquendo/Desktop/python myexample.py
Why I am getting an error message as
'python' is not recognized as an internal or external command,
operable program or batch file.
What I am doing wrong?
You have to make sure that the python.exe folder is in your system path.
Make sure python is installed at the location
C:/Users/Esteban Oquendo/Desktop/
So, make sure python.exe file is present in the directory. If you are not sure where your python is installed. Try this is your windows command line:
which python
You will see the python location if you have python in your system (and if the python path is set correctly). Like this!

Is there anyway to run the python interpreter from sublime text 3? [duplicate]

This question already has answers here:
How do I run Python code from Sublime Text 2?
(16 answers)
Closed 6 years ago.
I want to be able to run the python intpreter from inside sublime text so I can run simple snippets of code. Is there any easy way of doing this? Or do I have to open it in another window?
try installing Terminal plugin and run python from sublime text
Yes its very simple by using this plugin. You can run other language interpreter too.
Sublime Repl
Install it using package control and set the settings according to documentation. After installation, you can access the repl by going to Tools -> command pallet. Type in sublimerepl, there you will find for python.

Execute Python in Sublime Text 3 [duplicate]

This question already has an answer here:
How do I run python from Sublime text 3?
(1 answer)
Closed 6 years ago.
How can I execute Python 2.7 code using Sublime Text 3 on Windows 10? When I use the shortcut Ctrl+B it says 'python' is not recognized as an internal or external command, operable program or batch file. I can't edit python.sublime-build because as far as I know it does not exist in Sublime Text 3.
EDIT: I see this question is a duplicate. I did not see the post when I searched up the topic for some reason.
You need to add python to your system path or if you already have there is a chance that
that in C:\Windows there is exe with python icon called "py" rename it to "python" and it should work fine.

Pydoc won't run on command prompt [duplicate]

This question already has answers here:
Pydoc is not working (Windows XP)
(8 answers)
Closed 8 years ago.
I'm working through this "Learn python the Hard Way" book and the book is now saying to run
'pydoc open'
I do this and get the response that pydoc is not an internal or external command etc.
I've trying adding 'C:\Python27\lib\pydoc.py' to PATH and restarting my computer but it still hasn't worked.
Python is probably not in your path. you must add it in your path either by using the GUI or something like this:
set PATH = PATH;/path/to/pydoc/
This is a windows example, but it should not be hard to convert to a *nix version. The export command can be used in that case.

Categories