Ram*_*hum 16 python shell ipython
是否可以使用现有Python shell中的IPython shell作为shell-inside-a-shell,类似于内置code.interact()
?
yac*_*yac 19
在IPython 0.11中,API已经过大修,shell更容易调用:
import IPython
IPython.embed()
Run Code Online (Sandbox Code Playgroud)
推荐的嵌入 IPython 的方法效果很好:
~ $ python
Python 2.7 [...]
>>> from IPython.Shell import IPShellEmbed
>>> ipshell = IPShellEmbed()
>>> ipshell()
In [1]:
Run Code Online (Sandbox Code Playgroud)