use appropriate module for IPython 1.0.0

This commit is contained in:
Michele Comitini
2013-10-12 21:52:30 +02:00
parent 59290534bc
commit 1451997172
+6 -1
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)