【问题标题】:How to make a Run Configuration that runs current file in PyCharm?如何在 PyCharm 中创建运行当前文件的运行配置?
【发布时间】:2021-11-09 13:10:46
【问题描述】:

现在,每次我启动一个新的 Python 文件时,我都必须在 PyCharm 中进行新的运行配置才能运行它。有没有办法让默认配置只运行您正在查看的任何文件?还是我只需要为每个文件创建一个新配置?

【问题讨论】:

    标签: python pycharm


    【解决方案1】:

    在打开模块的编辑器中,只需右键单击或按 Ctrl + Shift +F10,请参阅Run without any previous configuring

    IDE 将为您创建一个临时运行配置,该配置使用File > Settings > Project > Python Interpreter 中设置的项目,请参阅Changing the Python interpreter in the project settings

    【讨论】:

      猜你喜欢
      • 2017-10-04
      • 1970-01-01
      • 2020-07-09
      • 2022-12-11
      • 1970-01-01
      • 1970-01-01
      • 2015-08-30
      • 2016-02-27
      • 2019-06-06
      相关资源
      最近更新 更多