I have just recently get into Python programming. In the YouTube videos I’ve watched, every time they run a Python program, the VS Code terminal only show the output.
In my VS Code, it also shows two windows’ directories first before showing the output, which I’d rather not have. Below is my code on the computer screen:
PS C:UsersBillDesktopArtificial Intelligence> &
C:/Users/Bill/AppData/Local/Programs/Python/Python312/python.exe "c:/Users/Bill/Desktop/Artificial Intelligence/Day 1 - Self-taught Py/snake.py"
1
Is there any way I could make VS Code only show the output?
2
Answers
ctlr+shift+X
and search for python and ensure it is installed.Open command palette by pressing
ctrl+shift+p
and type tasks.Select
Tasks: configure tasks
, then chooseCreate tasks.json file from template
then chooseother
as the template.Modify the
tasks.json
file with following contentRun the Task: To run the Python file using this task, open the Command Palette (Ctrl+Shift+P) and type Run Task. Select Run Python File.
The vsocde extension named: jupyter
I often use this.