From 3c0736156676fd39fc227990f8d92e8ec387fae3 2013-03-23 18:58:50 From: MinRK Date: 2013-03-23 18:58:50 Subject: [PATCH] add %%html cell magic --- diff --git a/IPython/core/magics/display.py b/IPython/core/magics/display.py index 5a075fb..0ec6652 100644 --- a/IPython/core/magics/display.py +++ b/IPython/core/magics/display.py @@ -12,7 +12,7 @@ #----------------------------------------------------------------------------- # Our own packages -from IPython.core.display import display, Javascript, Latex, SVG +from IPython.core.display import display, Javascript, Latex, SVG, HTML from IPython.core.magic import ( Magics, magics_class, cell_magic ) @@ -45,3 +45,8 @@ class DisplayMagics(Magics): def svg(self, line, cell): """Render the cell as an SVG literal""" display(SVG(cell)) + + @cell_magic + def html(self, line, cell): + """Render the cell as an SVG literal""" + display(HTML(cell))