handling implicit prompt request in run time like colab

オープン
#513 コメント 12 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
jupyter, jupyter-notebook, python
領域
backend

調査の方向性

JupyterLab で !touch something.txt に続けて !rm -i something.txt を実行して動作を再現し、関連するコンテキストについてリンク先の JupyterLab issue #8522 を読んでください。完了とは、magic コマンドまたはネイティブサポートのいずれかによって、カーネルセルを無期限に実行したままにすることなく、暗黙的なランタイムプロンプトがユーザーに表示されることを意味します。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
Python
スター
734
フォーク
411
平均マージ
1日 2時間
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipython/ipykernel のほかの issue

ipython/ipykernel の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。