Issue
The "Enter" key in new IPython versions (5+) inserts a line break instead of executing the current block of code (e.g. inside a function definition); to execute the code block you have to navigate the cursor to the last line and then hit "Enter". In older version hitting "Enter" would directly execute the block. How can we execute the current code from the current cursor location without navigating to the end?
The following image shows what I mean, the curser is at the end of the line b=20
, I want to execute this block of code without having to navigate the cursor to the end of the next line. Is there a way to achieve this?
Solution
Alt + Enter
or
Esc + Enter
execute the current code block, regardless of cursor position.
Answered By - Andy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.