Is it possible to embed rendered HTML output into IPython output?
One way is to use
from IPython.core.display import HTML
HTML('<a href="http://example.com">link</a>')
or (IPython multiline cell alias)
%%html
<a href="http://example.com">link</a>
Which return a formatted link, but
- This link doesn’t open a browser with the webpage itself from the console. IPython notebooks support honest rendering, though.
- I’m unaware of how to render
HTML()
object within, say, a list orpandas
printed table. You can dodf.to_html()
, but without making links inside cells. - This output isn’t interactive in the PyCharm Python console (because it’s not QT).
How can I overcome these shortcomings and make IPython output a bit more interactive?