ipylab icon indicating copy to clipboard operation
ipylab copied to clipboard

Initialise widgets without going through a notebook

Open pierre-yv opened this issue 2 years ago • 3 comments

Also a question rather than an issue.

Let's say I want to have the widgets that I defined to be created without having to run a notebook first, is there a simple way to achieve this?

Right now I am just quickly executing and closing a notebook when the jupyter session starts.

I believe there should be a way to rather go through a python script but I am noit sure how the notebook communicates with the jupyterlab APIs

Does this make sense?

pierre-yv avatar May 12 '23 18:05 pierre-yv

Thanks @pierre-yv.

That would indeed be useful.

Probably this will still require a Python kernel to be running. But we could imagine having a plugin in ipylab that reads notebooks or Python files at startup, and starts the kernel automatically. This is not implemented currently but could be.

jtpio avatar May 14 '23 08:05 jtpio

Hello, What would in your opinion be the best way to do this (I am quite ignorant here)?

THis and this?

pierre-yv avatar May 15 '23 07:05 pierre-yv

Haven't looked into it that much, but yes starting a kernel via the @jupyterlab/services API will probably be a good first step.

jtpio avatar May 16 '23 06:05 jtpio