Is it possible to switch the directory listing shown in the file browser using a launcher shortcut ?
Right now I can switch directory in the file browser only through clicking on an open notebook’s tab and selecting “Show in file browser”.
I work with multiple directories deep down in a hierarchy, creating workspace for each directory seems like an overkill.
Thanks for the response.
I can temporary get around this issue by creating symlinks to the directories at the root directory where Jupyter Lab is running.
But it is nice to have a feature where control of file browser can be done through executing a command in the notebook cell.
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