jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
14.17k stars 3.39k forks source link

Shell command requiring input blocks the cell #14041

Open astrojuanlu opened 1 year ago

astrojuanlu commented 1 year ago

Description

(This comes from https://github.com/ipython/ipython/issues/10499 - I'm not sure if there's an issue tracking this problem on JupyterLab or classic Notebook, tried looking for stdin and scan the titles but didn't find anything)

Any shell command (prefixed by !) requiring input (stdin) blocks the cell.

IPython:

image

JupyterLab:

image

Reproduce

  1. Type !(echo "type something"; read foo; echo $foo) in a cell (or any other shell command prompting the user for input)
  2. Run cell
  3. Observe that it gets blocked

Expected behavior

I can think of two options:

Context

krassowski commented 1 year ago

I can reproduce this on both 3.x and 4.0.0a34

There's a text box where I can type input.

This is what I would expect too.

Somewhat related to https://github.com/jupyterlab/jupyterlab/issues/8632 and https://github.com/jupyterlab/jupyterlab/pull/8713.