jupyter / jupyter-js-notebook

JupyterLab notebook
BSD 3-Clause "New" or "Revised" License
46 stars 18 forks source link

Handle interactive kernel responses in output area #227

Open afshin opened 8 years ago

afshin commented 8 years ago

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

blink1073 commented 8 years ago

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

afshin commented 8 years ago

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.

blink1073 commented 8 years ago

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

afshin commented 8 years ago

Good point.