Python 在 PyCharm 中运行命令行命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28570058/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 03:27:36  来源:igfitidea点击:

Running command line commands within PyCharm

pythoncommand-linepycharm

提问by Danrex

Hi I am using Python and have never really used it before. I have some commands sent to me that I need to run in the terminal. Basically:

嗨,我正在使用 Python,以前从未真正使用过它。我收到了一些需要在终端中运行的命令。基本上:

python Test.py GET /feeds

I am using PyCharm and I was wondering if there was a way to run these same commands from within that IDE?

我正在使用 PyCharm,我想知道是否有办法从该 IDE 中运行这些相同的命令?

采纳答案by dpitkevics

Press Alt+F12 to open terminal within PyCharm, then write in the command you wish to run and press enter.

按 Alt+F12 在 PyCharm 中打开终端,然后输入要运行的命令并按 Enter。

In your case:

在你的情况下:

  1. Press Alt+F12
  2. Type python Test.py GET /feeds
  3. Press Enter
  1. Alt+F12
  2. 类型 python Test.py GET /feeds
  3. Enter