Syntax for jupyterlab programatic UI commands

I’m trying to get a download link for a particular file using the UI commands made available through ipylab eg

from ipylab import JupyterFrontEnd
app = JupyterFrontEnd()
app.commands.execute('filebrowser:copy-download-link', {'path': './create_user_account.py'})

Assuming my last command is correct… where does the output of the command go? I dont see it in the output in the jupyterlab notebook cell. BTW, a command like

app.commands.execute('docmanager:delete-file', {'path': 'setup.log'})

works just fine.

1 Like