ipython / ipython/ipykernel

handling implicit prompt request in run time like colab

Đang mở
#513 12 bình luận 7 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

I've recently encountered this problem that when my code has an implicit user input request, the Jupiter notebook isn't able to handle it and the kernel just keeps running until I manually interrupt it. If I explicitly use an `input` or `read` command the kernel will ask me for user input while running in a cell and the problem is for command requiring input without asking explicitly.

The google colab can handles such a situation without any problem and I'm asking for a magic command to do the same in Jupiter notebook and jlab. consider the following example which doesn't have any explicit input or read function associated with it:
```
!touch something.txt
!rm -i something.txt
```
If I run this code in colab, a prompt will come up and ask me if I want to delete `something.txt`. However, if I run the same code in jlab, the kernel keeps running in that cell and I get no prompt or any other output until I interrupt the kernel manually!!

- So, this is a feature request for a **new magic command** or **native support** to watch for implicit input requests in run time, similar to what colab does natively without any magic.
- The original problem was mentioned [here](https://github.com/jupyterlab/jupyterlab/issues/8522)
- a StackOverflow question regarding this problem was asked [here](https://stackoverflow.com/questions/62296085/ipython-magic-command-to-respond-prompt-request-in-notebook)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.