title: How to create python classes in Jupyter Notebook
body: <p>I've tried to created and use classes in jupyter notebook.
  But it seems it doesn't work
  And I've tried this :</p>
  
  <pre><code>def pxlocal(line, cell):
      ip = get_ipython()
      ip.run_cell_magic("px", line, cell)
      ip.run_cell(cell)
  ip.register_magic_function(pxlocal, "cell")    
  </code></pre>
  
  <p>And in different cell:</p>
  
  <p><code>%%pxlocal
  class MyClass(object):</code></p>
  
  <p>But when I run those two cells it gave me this error:</p>
  
  <pre><code>ERROR:root:Cell magic `%%px` not found.
  In [11]:
  </code></pre>
  
  <p>What am I doing wrong?</p>