.12系列中的等效IPython代码

时间:2011-12-29 20:31:41

标签: ipython

使用IPython .10-2,我可以从python命令行程序中执行以下操作:

from IPython.Shell import IPShellEmbed
IPShellEmbed(argv=[])()

这会在调用时产生一个交互式IPython会话。我一直无法找到.12系列IPython的等价物。

有吗?

谢谢,吉姆

1 个答案:

答案 0 :(得分:3)

最简单的方法:

from IPython import embed
embed()

the docs中还有更多信息。