-3

I learn about python, so I run python code in visual studio code on windows by creating a folder consisting of files main.py and settings.json.

The results in the terminal have no errors, but I am confused about execute the results to cmd or other files to be given to the user without seeing my code.

Red
  • 26,798
  • 7
  • 36
  • 58
fefe
  • 7
  • 1

1 Answers1

0

In the terminal, navigate to the same folder your python file is located, and enter

python main.py

Or, if you're not going to navigate to the folder, you can include the entire path like this

python C:/Users/User/Desktop/Folder/main.py
Red
  • 26,798
  • 7
  • 36
  • 58
  • Or you could do it properly, and use, `"F:\ull\Path To\python.exe" "P:\ath To\main.py"`, which would mean you didn't have to mess with, or rely upon, environment variables etc, _(in this case, at least `%PATHEXT%` and `%Path%`)_. – Compo Dec 14 '20 at 15:26