2010-08-06 58 views

回答

3

嵌入IPython中的recommended way正常工作:

~ $ python 
Python 2.7 [...] 
>>> from IPython.Shell import IPShellEmbed 
>>> ipshell = IPShellEmbed() 
>>> ipshell() 

In [1]: 
1

的Django manage.py shell可能的情況下調用IPython的外殼,它的實現是這樣的:

import IPython 

shell = IPython.Shell.IPShell() 
shell.mainloop() 
19

IPython的0.11的API已經大修和殼更容易調用:

import IPython 

IPython.embed()