Merge pull request #253 from michele-comitini/issue-1710

use appropriate module for IPython 1.0.0
This commit is contained in:
mdipierro
2013-10-13 06:24:13 -07:00

View File

@@ -288,9 +288,14 @@ def run(
else:
try:
import IPython
if IPython.__version__ >= '1.0':
if IPython.__version__ > '1.0.0':
IPython.start_ipython(user_ns=_env)
return
elif IPython.__version__ == '1.0.0':
from IPython.terminal.embed import InteractiveShellEmbed
shell = InteractiveShellEmbed(user_ns=_env)
shell()
return
elif IPython.__version__ >= '0.11':
from IPython.frontend.terminal.embed import InteractiveShellEmbed
shell = InteractiveShellEmbed(user_ns=_env)