title: Jupyter - ending multiline magic command in console
body: <p>In a Jupyter notebook, a "cell magic" command (prefixed with two percent signs) ends at the end of the cell and is automatically invoked:</p>
  
  <p><a href="https://i.stack.imgur.com/Mha5I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mha5I.png" alt="%%timeit in Jupyter notebook"></a></p>
  
  <p>But if I try the same thing in the Jupyter console, the command never ends, after any number of blank lines:</p>
  
  <p><a href="https://i.stack.imgur.com/hCYq3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hCYq3.png" alt="enter image description here"></a></p>
  
  <p>That only happens if I invoke IPython as <code>jupyter console</code>, though. If I invoke IPython directly as <code>ipython</code>, the cell magic command completes after one blank line:</p>
  
  <p><a href="https://i.stack.imgur.com/UQQW3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UQQW3.png" alt="enter image description here"></a></p>
  
  <p>For each example, the versions of Python and IPython are identical: Python 3.5.2 and IPython 6.1.0 on one machine (installed with pip), Python 3.4.5 and IPython 5.1.0 on another (installed with Conda).</p>
  
  <p>Is this a bug? Or is there Jupyter default configuration somewhere for IPython that differs from IPython's own default configuration?</p>