I am developing the Jupyter core for Elm, and I would like users to be able to split their code into multiple code cells. To do this, I plan to allow the kernel to accumulate code from several cells without compiling it. After he received all the code, it must be compiled together, it will compile it and return the results.
I still do not understand how to allow users to "mark" the last cell in the multi-cell example. One option is for them to insert a special comment (for example, -- compile-cellsor something like that) that searches for the kernel, but it looks like a hack.
It seems that more than jupyter-esque will allow the user to set the metadata flag (possibly via an auxiliary extension) to the cells that are at the end of the example. Installing metadata is simple enough, but I can't figure out how to access metadata in the kernel.
So, is there a way to access cell metadata in the kernel? In particular, I am currently using a base class ipykernel.kernelbase.Kernelfor my kernel, so ideally I could access the cell metadata from a function do_execute.
If this is not possible, is it possible to do the same thing in some other way?
source
share