【问题标题】:In Spyder having to click on the console before responding to an input prompt在 Spyder 中,必须在响应输入提示之前单击控制台
【发布时间】:2017-05-20 19:49:22
【问题描述】:

有什么方法可以让我按下运行并开始输入input 提示的答案?它不影响其他任何东西,只是每次都要把手从键盘上移开真的很烦人

【问题讨论】:

  • 你想自动化它们吗?
  • @PetIbaño 不,我只想单击 f5 启动程序并开始输入对输入提示的响应,而无需触摸鼠标

标签: python input console spyder


【解决方案1】:

如果您使用单元格运行代码(这允许您使用 #%% 形式的 cmets 将文件分成几部分),那么您可以转到

Preferences > Editor > Advanced settings > Maintain focus in the Editor after running cells or selections

并停用该选项以获得您想要的行为。

【讨论】:

  • 此功能/选项在 Spyder 3.1.2 中不起作用(至少在我的 windows 7 x64 上)
  • 我在 Spyder 4.1.4 中尝试过,但它不起作用。此外,该选项已移至:Tools > Preferences > Editor > **Run code** > Maintain focus in the Editor after running cells or selections
猜你喜欢
  • 1970-01-01
  • 2021-12-27
  • 2019-05-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-18
  • 2019-05-26
  • 2018-05-26
相关资源
最近更新 更多