How to run current line in Spyder 3.5( ctrl +f10 not working)

老子叫甜甜 提交于 2019-12-04 23:59:33

The key to run the current line by itself is F9. The shortcut ctrl+F10 is used if you are in debugging mode.

You can see a list of shortcuts by selecting Preferences in the Tool menu, and then clicking on Keyboard shortcuts.

Coming from R studio I imagine you were hoping to have a command that runs the next command, rather than just that one row (which can break a command into several parts and cause errors).

The exact equivalent doesn't exist yet but if you get accustomed to adding #%% before and after chunks ("cells") you want to run together then you can use the following commands to run the whole chunk.

Run cell: Ctrl + Return
Run cell and advance : Shift+Return

Some keyboards have a different layout than others in terms of what the keys are supposed to do. For me running happens if done via Fn + F9.

F9 is the key that does the job for you. To replicate the RStudio style, go to Preferences in Tools menu and go to Keyboard Shortcuts.

Since Ctrl + Enter is assigned to another function, change that first. Then assign the F9 key value to Ctrl + Enter. Now Spyder is the same as RStudio. Atleast in a way.

Control Enter is a quick way of executing a line or block of code in both R Studio & Python.

In Spyder, make sure the line or block is highlighted before you hit 'ctrl-enter'

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!