jtpio / ipylab

Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing panel

qrdlgit opened this issue · comments

I looked extensively through the api, but it's not clear to me how to remove a panel after adding and losing the object variable in python.

This seems to work:

app = JupyterFrontEnd()
app.shell.add(panel, 'left', {'rank': 10000})
..
  panel.close()
  del panel

But what happens if you lose the panel object (eg: accidentally create a new and clobber it). Is there a way to enumerate through the app and get the panel and then clean it up?