2018-12-20 20:57:21

Hey, so about a few days ago, I decided to try get back into programming. So far I have found a few books to help me get started like,  "The Coder’s Apprentice" for python three. I was trying to   get notepad ++ to run the code, but I have been running into some issues. I have ran code
through notepad but now it is not working.
This is what I am doing.
I   followed the steps on this website.
https://silentcrash.com/2016/12/run-pyt … t-notepad/
Python is installed on the root of the C drive.
So I open the program press f5, and This is the command  I was trying to use.
C:\Python37-32\Lib\idlelib\idle.py “$(FULL_CURRENT_PATH)”
Yes and I no, I am doing something wrong but I don't no what that is. I have also tried doing things like removing the quotes, Making it point to ppython,.exe.
Any help would be greatly appreciated. As a side note, Does anyone no of any other  courses  or books I could use.
Thanks

2018-12-20 23:05:55

if you have python on your path, then just call python yourscript.py and you'll be good to go.

2018-12-20 23:19:19 (edited by willbilec 2018-12-20 23:23:29)

It worked!  all  though  it is longer.
The way I did it was go  to the folder where the py files were stored. Then press altD Then type cmd. Then type the file name and it runs.
Is there a quicker way of doing it. I will be  running  the code often.

2018-12-21 07:25:51

Hi,
When you install python, there is a check box called add python to path. What that means, is that you would be able to run your python code from anywhere. Don't worry though, even if you miss that check box you still can do it manually.
Open your command prompt (windows+r> type cmd> press enter). Now type this command:
set path=c:\python37
Just replace the path with where you copied your file as you said in a previous post and you will be all set to use python from anywhere.

2018-12-21 07:40:43

@3 2 options at this point
either do python path to file like:
python c:\users\bla\desktop\python\file.py
Or you could just click enter on the python file and open it that way. But by doing that your screenreader won't catch the console output as a result, your program will open for one second then close, if you're performing printing stuff. That's why it's recommended to use it from cmd.

Paul