Commits

Georg Brandl committed f9fb310

fix %tbl magic for later IPython versions

Comments (0)

Files changed (1)

             expr = expr.replace('?' + subst, val)
         if unit:
             expr = 'Quantity.any_to((' + expr + '), %r)' % unit
-        shell.run_cell(expr, False)
+        if hasattr(shell, 'shell'):  # later IPython versions
+            shell.shell.run_cell(expr, False)
+        else:
+            shell.run_cell(expr, False)
 
 
 q_transformer = QTransformer()