ipylab icon indicating copy to clipboard operation
ipylab copied to clipboard

Open new kernel communication from ipylab

Open hbcarlos opened this issue 5 years ago • 4 comments

Trying to use ipylab without a notebook.

We have an extension for JupyterLab that creates a new kernel connection and executes the following code in the kernel:

from ipylab import JupyterFrontEnd, Panel, SplitPanel
from ipywidgets import IntSlider, Layout
app = JupyterFrontEnd()
panel = Panel()
slider = IntSlider()
panel.children = [slider]
app.shell.add(panel, 'main', { 'mode': 'split-right' })

The issue is that with the response we get the exception "Exception opening new comm" that comes from _handelCommOpen() when calls to loadObject.

Screenshot 2020-07-29 at 22 39 53

Screenshot 2020-07-29 at 22 42 42

@jtpio @wolfv

hbcarlos avatar Jul 29 '20 21:07 hbcarlos

Thanks @hbcarlos for opening this issue.

We have an extension for JupyterLab

If there is already a JupyterLab extension, why not use the JupyterLab API in TypeScript directly?

Or is the goal being able to use the existing Panel and other shortcuts from ipylab directly to quickly create new widgets?

Ideally we would be able to do everything from Python at some point, with something like:

from ipylab import Kernel
kernel = new Kernel
# and then somehow create widgets for that kernel

jtpio avatar Jul 30 '20 10:07 jtpio

Or is the goal being able to use the existing Panel and other shortcuts from ipylab directly to quickly create new widgets?

The idea is to use ipylab to quickly create new widgets for JupyterLab using only python.

hbcarlos avatar Aug 03 '20 11:08 hbcarlos

I also tried the same kind of thing. I was hoping to open a notebook in jupyterlab via the command line (a feature that jupyterlab lacks to be a real IDE). https://github.com/jupyterlab/jupyterlab/issues/5056

Do you think this is (or will be) possible with ipylab? Regards

djangoliv avatar Jul 04 '23 14:07 djangoliv

@djangoliv linking to https://github.com/jupyterlab/jupyterlab/pull/9687 which was experimented with in JupyterLab directly, and could be related.

jtpio avatar Jul 17 '23 06:07 jtpio