Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Basthon
Basthon Kernel
Commits
f7718d7d
Commit
f7718d7d
authored
Dec 11, 2020
by
Romain Casati
Browse files
Adding HTML support to IPython.display.
parent
acf9d2d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/IPython/IPython/display.py
View file @
f7718d7d
import
pyodide
__all__
=
[
"display"
,
"display_image"
]
__all__
=
[
"display"
,
"display_image"
,
"HTML"
]
display
=
pyodide
.
Basthon
.
basthon_internal
.
display
display_image
=
pyodide
.
Basthon
.
basthon_internal
.
display_image
def
HTML
(
html
):
""" Sending html string to IPython notebook. """
def
_repr_html_
():
return
html
dummy
=
type
(
'HTML'
,
(),
{})()
dummy
.
_repr_html_
=
_repr_html_
return
display
(
dummy
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment