【问题标题】:Why does my Visual Studio Terminal print directories and links?为什么我的 Visual Studio 终端打印目录和链接?
【发布时间】:2020-03-31 11:58:26
【问题描述】:

我是初学者,我似乎无法清理我的终端。每次我运行代码时,Visual Studio 都会在其终端中打印它,并且会出现比代码更多的内容。如何删除除代码之外的所有内容?一个简单的 Hello World 代码输出如下:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Owner\Desktop\Ex_Files_Learning_Python> & C:/Users/Owner/AppData/Local/Programs/Python/Python38-32/python.exe "c:/Users/Owner/Desktop/Ex_Files_Learning_Python/Exercise Files/Ch2/Untitled-1.py"
hello world!
PS C:\Users\Owner\Desktop\Ex_Files_Learning_Python> 

【问题讨论】:

  • 您到底想删除什么?也是命令提示符的一部分?
  • 如果您想缩短/修改命令提示符(在您的情况下为 PS C:\Users\Owner\Desktop\Ex_Files_Learning_Python>),请参阅 PS C:\Users\Owner\Desktop\Ex_Files_Learning_Python>

标签: python visual-studio-code terminal


【解决方案1】:

很遗憾,您无法避免这种情况。您的代码正在终端中执行,这就是将脚本传递给 Python 以运行它所需要的。

【讨论】:

    猜你喜欢
    • 2019-05-18
    • 2015-07-21
    • 1970-01-01
    • 2022-01-25
    • 1970-01-01
    • 2016-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多