Hi I'm new to Linux and I really like the idea of writing and testing python code in a shell. But my problem is how can I do line breaks in IPython. Every time I use the (I think) "normal" shortcut shift+enter the code gets executed. Function keys are disabled and keyboard layout works fine on my laptop, what could be the problem?
I just came across a solution, posted by Kenneth Falck: IPython newlines with ^V^J
While editing a multiline code block use Ctrl+V CTRL+J
If you want to do a line-break, you end the line with the \
escape character, same as you do in a Python file. Shift+Enter
doesn't have any special meaning in ipython
, and indeed most over places in the shell. It doesn't have special meaning in Python, either.
It does have special meaning in some text editors and word processors, most notably LyX and LibreOffice, and of course on some websites (through a web browser).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With