Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
jupyter, jupyter-notebook, python
Lĩnh vực
backend

Hướng nghiên cứu

Tái hiện hành vi bằng !touch something.txt, sau đó là !rm -i something.txt trong JupyterLab, rồi đọc issue #8522 của JupyterLab được liên kết để biết thêm ngữ cảnh liên quan. Được xem là hoàn thành khi các prompt runtime ngầm được hiển thị cho người dùng mà không để ô kernel chạy vô thời hạn, thông qua một lệnh magic hoặc hỗ trợ native.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

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
  • a StackOverflow question regarding this problem was asked here
Ngôn ngữ chính
Python
Star
734
Fork
411
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
9

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

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ipython/ipykernel

Tất cả issue của ipython/ipykernel

Issue tương tự

Thêm issue về Python

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.