jupyter/jupyter-js-notebook

Handle interactive kernel responses in output area

Opened this issue · 4 comments

Executing inputs that don't immediately return a result (like invoking the help() functionality) require the output area to support handling input_request messages.

This is a general problem for both the notebook and the console. In order to see the problem manifest, at a console prompt, entering and executing the command help() will cause the kernel to pause while it waits for user input. The kernel will remain unusable from that point forward.

cc: @blink1073 @jasongrout

My notes:

We'll need to handle input messages here that result in an output type for input requests.
This output type will result in an output widget that has the input text and an input field (which may or may not be a password). Hitting enter will send the input reply to the kernel and render the widget as text.

If there is another input request, it will be added as another widget after the existing one.

ref: http://jupyter-client.readthedocs.io/en/latest/messaging.html#messages-on-the-stdin-router-dealer-sockets

For the console, we'll have to stall creation of a new prompt until after the user has ended interaction with this new output area.

That will already be the case because we won't get an execute reply until interaction is done.

Good point.