<s> from metakernel import Magic <EOL> from IPython . display import HTML <EOL> class HTMLMagic ( Magic ) : <EOL> def line_html ( self , code ) : <EOL> """<STR_LIT>""" <EOL> html = HTML ( code ) <EOL> self . kernel . Display ( html ) <EOL> def cell_html ( self ) : <EOL> """<STR_LIT>""" <EOL> html = HTML ( self . code ) <EOL> self . kernel . Display ( html ) <EOL> self . evaluate = False <EOL> def register_magics ( kernel ) : <EOL> kernel . register_magics ( HTMLMagic ) </s>
