fix for using the shell with IPython >= 1.0
This commit is contained in:
+4
-1
@@ -288,7 +288,10 @@ def run(
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
import IPython
|
import IPython
|
||||||
if IPython.__version__ >= '0.11':
|
if IPython.__version__ >= '1.0':
|
||||||
|
IPython.start_ipython(user_ns=_env)
|
||||||
|
return
|
||||||
|
elif IPython.__version__ >= '0.11':
|
||||||
from IPython.frontend.terminal.embed import InteractiveShellEmbed
|
from IPython.frontend.terminal.embed import InteractiveShellEmbed
|
||||||
shell = InteractiveShellEmbed(user_ns=_env)
|
shell = InteractiveShellEmbed(user_ns=_env)
|
||||||
shell()
|
shell()
|
||||||
|
|||||||
Reference in New Issue
Block a user