Closed Conchylicultor closed 1 year ago
Would also love this. Just noting that this is already possible, just not supported (#13243). Which means allowing it does not change the current level of security.
Closing this issue, as the package https://github.com/manzt/anywidget now makes it very easy for front end code to communicate with the kernels using ipywidgets.
Though jupyter ntoeb9ook exposes a way to communicate with the kernel, jupyter lab no longer supports this. I believe using IPyWidgets is the right way (as thats what Jupyter lab also recomends)
With Colab/Jupyter, it is possible to have bidirectional communication between Python/Javascript, without installing a notebook extention:
In Jupyter, it is possible to execute arbitrary Python code from JS:
In Colab, for security reason, it is forbidden. However, it is still possible to call explicitly registered Python functions with input/outputs serialised to
Json
.It is very convenient, and unlock powerful use-cases. For example:
pandas.DataFrame
in Colab can be viewed interactively (with filters, pages,...).ecolab.inspect(obj)
to interactivelly inspect arbitrary Python objects: https://www.youtube.com/watch?v=MFbb5wZlYvEThere's an duplicate issue which was closed (https://github.com/microsoft/vscode-jupyter/issues/6918), even though the original issue (https://github.com/microsoft/vscode-jupyter/issues/7551) hasn't been fixed.
VSCode.kernel.invokeFunction
similar to Colab.