You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did a little research on this, and hope it helps you out!
In my understanding they are lightweight expressions that are run after the main request code is executed. They are run against the state of the user's kernel, but they shouldn't affect the state of the kernel. An example would be something like a front-end tool that requests the value of a variable after it is assigned so that it can be inspected:
The Jupyter Client documentation also gives another use-case of a front-end requesting data to get information for prompts. I found it a little confusing, but here it is:
The user_expressions field deserves a detailed explanation. In the past, IPython had the notion of a prompt string that allowed arbitrary code to be evaluated, and this was put to good use by many in creating prompts that displayed system status, path information, and even more esoteric uses like remote instrument status acquired over the network. But now that IPython has a clean separation between the kernel and the clients, the kernel has no prompt knowledge; prompts are a frontend feature, and it should be even possible for different frontends to display different prompts while interacting with the same kernel. user_expressions can be used to retrieve this information.
Any error in evaluating any expression in user_expressions will result in only that key containing a standard error message, of the form:
Not sure what
user_expressions =
isThe text was updated successfully, but these errors were encountered: