(Jun-18-2021, 08:14 PM)Larz60+ Wrote: you should create a project file for each project and perhaps store python scripts in a subdirectory of that.
If installed properly, python should be visible in any directory,
You should never put anything in the python installation directory.
the following is a typical project directory structure that I use (you probably don't need all of these directories):
Output:├── ProjectName │ ├── data │ │ ├── csv │ │ ├── database │ │ ├── html │ │ ├── json │ │ ├── pretty │ │ └── tmp │ ├── docs │ ├── requirements.txt │ ├── src │ │ └── any.py | │ ├── ...
- simply change to the directory where the python file exists.
- open a command window
- to make sure python is properly installed, run command
python -V
- run program with command:
python myscript.py
Thanks @Larz60+
I do have a directory C:/PythonProjects/TextEditor.py - But it makes no difference.
I would prefer to open in a browser. The opening of a command window is extremely frustrating & unlike web development.
If I open Python & type 6*2 + enter 12 appears.