2024-04-26 04:16:22 发布
网友
是否可以使用现有pythonshell中的ipythonshell作为shell-inside-a-shell,类似于内置的code.interact()?在
code.interact()
Djangomanage.py shell尽可能调用IPython shell,其实现方式如下:
manage.py shell
import IPython shell = IPython.Shell.IPShell() shell.mainloop()
嵌入IPython的recommended way效果很好:
~ $ python Python 2.7 [...] >>> from IPython.Shell import IPShellEmbed >>> ipshell = IPShellEmbed() >>> ipshell() In [1]:
在IPython 0.11中,API已经过全面检查,shell更易于调用:
import IPython IPython.embed()
Django
manage.py shell
尽可能调用IPython shell,其实现方式如下:嵌入IPython的recommended way效果很好:
在IPython 0.11中,API已经过全面检查,shell更易于调用:
相关问题 更多 >
编程相关推荐