🖥
#python の IPython で #ruby の binding.pry 的なデバッグがしたいけど 標準入力が奪われてうまく動かなかっ
sys.stdin.read()
が全部と奪ってしまうらしい。
考えてみれば当たり前のような気もするが未言語化。解決策は未調査。
script
#!/usr/bin/env python3
from IPython import embed
import sys
sys.stdin.read()
embed()
a=1
exe
すぐに終了してしまう。
$ echo "abc" | ./debugtest.py
Python 3.7.2 (default, Jan 13 2019, 12:50:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: Do you really want to exit ([y]/n)?
Original by Github issue
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2019-04-06
Discussion