Closed bartbroere closed 2 years ago
Definitely, this should be part of the on-going work to bump Starboard to the latest version of Pyodide. In this update the cell output should no longer be a proxy (as it leaks memory) - instead it should look for these repr
functions and fall back to a string representation.
Here's a link to the current implementation that is proxy based https://github.com/gzuidhof/starboard-notebook/blob/master/packages/starboard-python/src/run.ts#L56-L85 - it will work for stuff like Sympy and Pandas.
I just released version 0.15.0, which has the same built-in _repr_*_
support without leaking stuff :)
IPython has a convention that a lot of packages follow, where you can add user friendly representations, in methods like
_repr_html_()
or_repr_jpeg_()
. Could we adopt this convention in Starboard Notebook?I would be willing to work on this when I have some time.