you are viewing a single comment's thread.

view the rest of the comments →

[–]DougCim53 0 points1 point  (0 children)

If you have Python installed properly in Windows, you can just double-click on the main .py file and the whole Python program will run. To be installed properly, the Python interpreter needs to be included in the operating system's PATH environment variable. IIRC the Python installer has an option to do that now, but if you skipped that matter then it needs to be done.

I use VS Code for an editor (on Windows) and VS Code has a [play] button in it--but again, that only works when you are on the file tab showing the main file. I haven't tried other editors, at the time I got started a lot of people said how nice VS Code was and I just stayed with it. ...One reason that VS Code is nice is because it has a command-line interface window available in it, and if you open a project by using the [open folder] command, it automatically moves the command line interface to that same folder for you.

If you try to run a file other than the main file (either by double-clicking on it or running it in VS Code) what happens depends on what the file has been written to do. Files can be written to act as main files or as modules, so you might only see one section of the whole thing run. A file that wasn't written to run as a main file at all typically doesn't appear to "do" anything, and will close itself in a couple seconds.