有没有办法以编程方式强制Python脚本在其执行的任意点放入REPL,即使脚本是从命令行启动的?
我正在编写一个快速而肮脏的绘图程序,我想从stdin或文件中读取数据,绘制它,然后放入REPL以允许自定义绘图.
python interactive
是否可以使用现有Python shell中的IPython shell作为shell-inside-a-shell,类似于内置code.interact()?
code.interact()
python shell ipython
python ×2
interactive ×1
ipython ×1
shell ×1