问题:在pycharm中点击run运行脚本,或者使用ctrl+shift+F10运行脚本,发现没有打开run窗口,而是打开的Python console窗口。
解决方法:打开菜单栏run->edit configurations,先点击左上角的扳手,再把下图中的复选框取消就可以了。
总结:
菜单栏运行(run)→ 调试配置(edit configurations)→ 使用python控制台运行(run with python console),则为每个脚本配置使用console运行还是使用run运行:
打钩则用console运行run,alt+shift+e仍是用console运行;
不打√,则用run运行run,alt+shift+e仍是用console运行。
若要编辑通用模板,则在templates中设置是否打钩使用python控制台运行(run with python console):