<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><font color="#0000ff">    def my_func():<br></font></div><div><font color="#0000ff">        HTML("<b>Some html</b>")</font></div>
<div><font color="#0000ff">        some_widget.interact #display widget</font></div><div><font color="#0000ff"><br></font></div><div><font color="#0000ff">When I call this function from the notebook, only widget is rendered on the output cell, not the HTML. </font></div>
<div><font color="#0000ff">I guess that might be because widgets use different "type" of output method</font></div>
<div><font color="#0000ff">compared to usual output method.</font></div></div></blockquote><div><br></div><div>Try calling display(HTML("your html")).  See:  <a href="http://ipython.org/ipython-doc/dev/api/generated/IPython.core.display.html#IPython.core.display.display">http://ipython.org/ipython-doc/dev/api/generated/IPython.core.display.html#IPython.core.display.display</a></div>
<div><br></div><div>display() causes your Python object to be displayed on the frontend (e.g. in the notebook).  IPython normally displays last item in the cell / return value for you automatically, but you can call display() directly to force an object (other than the last item) to be displayed.</div>
<div><br></div><div>For example:</div><div><br></div><div><img src="cid:ii_14744cdf4bdcee62" alt="Inline image 1" width="355" height="226"><br></div><div><br></div><div>I hope this is helpful.</div><div><br></div><div>-andy</div>
</div></div></div>