When I try running a python code the output terminal displays the location where .py file is located in the white-colored text followed by the "&" sign and then the place where Python is installed as well as the file containing the Python code in blue text. I have no problem with the white text but earlier my VScode did not display this blue text, it's cluttering the output, is there any way to get rid of it.https://i.stack.imgur.com/CUeL4.jpg
Asked
Active
Viewed 2,032 times
0
-
use prompt command – Yeshwin Verma Apr 22 '21 at 06:02
-
Even after using prompt the blue text shows up again – S_G Apr 22 '21 at 06:05
-
possible dup? https://stackoverflow.com/questions/63758560/how-to-hide-the-file-path-displaying-in-visual-studio-codes-terminal – Buddy Bob Apr 22 '21 at 06:07
-
Does this answer your question? [Visual Studio Code Java paths in terminal](https://stackoverflow.com/questions/60513567/visual-studio-code-java-paths-in-terminal) – Yeshwin Verma Apr 22 '21 at 06:08
-
Search SO for all the other people that have asked the same question – rioV8 Apr 22 '21 at 10:57
2 Answers
2
At present, there is no direct way to omit the path information of "Terminal" in VS Code. This information shows us the path of the python interpreter used and the path of the executed file when executing the run command.
Workarounds:
Please use the setting in "launch.json":
"console": "internalConsole",
then clickF5
to debug the code, "DEBUG CONSOLE" will only display the result.You could use the VS Code extension "Code Runner" and use the settings in "settings.json":
"code-runner.showExecutionMessage": false,
then click "Run Code":
Reference: Python debug configurations in Visual Studio Code.

Jill Cheng
- 9,179
- 1
- 20
- 25
0
I use this at the start of my code to delete the previous line;
print('\033c')
Pop it at the top and it deletes the path name in the terminal when ran.

Taylor
- 1
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 17 '23 at 18:55