Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add list_commands #7

Merged
merged 1 commit into from
Nov 17, 2019
Merged

Add list_commands #7

merged 1 commit into from
Nov 17, 2019

Conversation

jtpio
Copy link
Owner

@jtpio jtpio commented Nov 17, 2019

Fixes #4.

Usage

from ipylab import JupyterFrontEnd

app = JupyterFrontEnd()
app.commands.list_commands()
['__internal:context-menu-info',
 'apputils:activate-command-palette',
 'apputils:print',
...
]

list_commands

@jtpio
Copy link
Owner Author

jtpio commented Nov 17, 2019

This returns a [] when executed in the same cell:

app = JupyterFrontEnd()
app.commands.list_commands()

This is because the model has not had time to be constructed on the frontend and send the list of commands back to the kernel.

We could add a shell_ready event that can be consumed from Python, so users could await it.

@jtpio jtpio merged commit e253e88 into master Nov 17, 2019
@jtpio jtpio deleted the list-commands branch November 17, 2019 21:19
@jtpio jtpio mentioned this pull request Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List of JupyterLab commands
1 participant