【问题标题】:Run python files in Cmder/ConEmu vs code在 Cmder/ConEmu 与代码中运行 python 文件
【发布时间】:2021-10-07 14:32:01
【问题描述】:

默认情况下,vs 代码在它创建的“python”终端中运行 python 文件,但我希望它在 Cmder/ConEmu 的外部终端中运行。我该怎么做?

【问题讨论】:

  • cmder/ConEmu 是单独的包吗?不管怎样,这可能是向 VS 人提出的问题(它有论坛吗?)这里的要求可能太具体了。
  • Cmder 和 ConEmu 是 cmd 模拟器
  • 请澄清您的具体问题或提供其他详细信息以准确突出您的需求。正如目前所写的那样,很难准确地说出你在问什么。

标签: python visual-studio-code conemu cmder


【解决方案1】:

是的,您可以在 VSCode 中使用 cmder shell。可以参考official docs

{
  "terminal.integrated.profiles.windows": {
    "cmder": {
      "path": "C:\\WINDOWS\\System32\\cmd.exe",  //point to the cmd.exe location
      "args": ["/K", "C:\\cmder\\vendor\\bin\\vscode_init.cmd"]  //point to vscode_init.cmd which under the installation location of the cmder
    }
  },
  "terminal.integrated.defaultProfile.windows": "cmder"
}

【讨论】:

  • 谢谢,但这并不是我想要的。我希望文件在外部 cmder 窗口中运行,而不是在集成窗口中运行。你能帮帮我吗?
  • @Groks_45 你能看看这个答案的更新吗?谢谢。
  • 我已经尝试过这样做。使用这些设置,cmder 会简单地启动,但代码不会自行执行。
  • @Groks_45 抱歉,真的不行,看来只能采取这个答案中提到的方法了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-09-17
  • 1970-01-01
  • 2019-05-04
  • 1970-01-01
  • 1970-01-01
  • 2021-12-29
相关资源
最近更新 更多