Short cut for switching directory in Jupyter Lab file browser

In that case you want GitHub - jtpio/ipylab: Control JupyterLab from Python Notebooks with Jupyter Widgets 🧪 ☢️ 🐍.

Something like:

from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute('filebrowser:go-to-path', {'path': '/'})
# or maybe it should be: (both seem to work)
# app.commands.execute('filebrowser:go-to-path', {'path': '.'})
2 Likes