Eclipse Pydev:运行选定的代码行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12335424/
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-09-19 18:57:14  来源:igfitidea点击:

Eclipse Pydev: Run selected lines of code

pythoneclipsepydev

提问by Michael

Is there a command in Eclipse Pydev which allows me to only run a few selected (highlighted) lines of code within a larger script?

Eclipse Pydev 中是否有一个命令允许我在更大的脚本中只运行几行选定(突出显示)的代码?

If not, is it possible to run multiple lines of code in the PyDev console at once?

如果没有,是否可以在 PyDev 控制台中一次运行多行代码?

回答by ajeje

press CTRL+ALT+ENTERto send the selected lines to the interactive console

按下CTRL+ALT+ENTER将选定的行发送到交互式控制台

回答by Max Gordon

The solution is selecting and pressing F2, see thisquestion or simply thissection of the manual.

解决方案是选择并按F2,请参阅问题或只是手册的这一部分。