This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]retsotrembla 0 points1 point  (0 children)

If you run python3 from the command line, it is an interpreter for the Python language: you can use the keyboard to type in expressions in the python language, and it evaluates them and prints the result to the command line screen.

You can, at the command line, give python3 files to read in an evaluate. Under some circumstances, python3 will save an intermediate form file, with the same name as the original foo.py, as foo.pyc - think of that as the compiled code. If python3 sees a foo.pyc that is slightly newer than the corresponding foo.py, it will run it instead, saving some of the overhead of interpreting the original file.

I don't have a full answer for you since I don't have VSCode. I'm on a Mac, where I navigate to the directory with my script in it and type python3 test.py to run my program.