thebe
thebe copied to clipboard
Multiple kernel support
Hi!
I am trying to display codes in two or more different programming languages on the same webpage. Is it possible to use multiple kernels in thebelab?
Thanks
I am trying to display codes in two or more different programming languages on the same webpage. Is it possible to use multiple kernels in thebelab?
At this stage, this is not supported out of the box: all cells are connected to the same kernel (see https://github.com/minrk/thebelab/blob/master/src/thebelab.js#L426). That being said, the code is relatively short, and it sounds like it could be adapted to support several kernels. This would be a nice contribution :-) Of course it would take extending the syntax for configuring kernels, etc.
But @minrk will know better!
Thanks for the reply @nthiery ! I will wait for @minrk's reply. :smiley: Meanwhile, I think only option is to create separate webpage for the separate programming languages.
One similar issue was posted on thebe github repo. But even there it's one kernel per page :(
This can be done with the ScriptOfScripts kernel. I got it running with Thebelab in a demo Jupyter Book (Octave/Matlab + Python cells, data being transferred between them) by simply switching out the "sos" tags in the markdown that were generated by "
python" manually (this might be a Jupyter Book-specific step I think).
Live demo: https://mathieuboudreau.github.io/introML-book/01/mvp_sos.html Repo (contains Dockerfile with all settings for SoS): https://github.com/mathieuboudreau/introML-book
@mathieuboudreau links down !