jupyter_console
jupyter_console copied to clipboard
Add %% magic for multi line cells
Sometimes I'd like to have multi line cells, for example when running several matplotlib commands. The current hack is to use the %%time magic
In [6]: %%time
: xs = np.linspace(-6, 6, 100)
: plt.plot(xs, np.sin(xs), label='sin')
: plt.legend()
:
CPU times: user 100 ms, sys: 4 ms, total: 104 ms
Wall time: 104 ms
However I think it'll be nice to have a %% magic (or %%cell) just for having multi line cells.
@tebeka , I was thinking about this. Did you figure it out? this would be very helpful
Typing Ctrl-O to insert a new line works for me. https://github.com/ipython/ipython/issues/2493#issuecomment-441208390
IMO this is a sensible feature request - but why not agree with Ipython on a common feature so that there is consistency?