Avoid IPython warning. thanks @bryant1410. closes #623

This commit is contained in:
Daniel Graña 2014-06-03 15:11:20 -03:00
parent 9830efb946
commit 1c9effd7b4
1 changed files with 5 additions and 2 deletions

View File

@ -13,8 +13,11 @@ def start_python_console(namespace=None, noipython=False, banner=''):
raise ImportError()
try:
from IPython.frontend.terminal.embed import InteractiveShellEmbed
sh = InteractiveShellEmbed(banner1=banner)
try:
from IPython.terminal import embed
except ImportError:
from IPython.frontend.terminal import embed
sh = embed.InteractiveShellEmbed(banner1=banner)
except ImportError:
from IPython.Shell import IPShellEmbed
sh = IPShellEmbed(banner=banner)