From 145199717263a2c2ddcfb12d1cd85d3d9492941a Mon Sep 17 00:00:00 2001 From: Michele Comitini Date: Sat, 12 Oct 2013 21:52:30 +0200 Subject: [PATCH] use appropriate module for IPython 1.0.0 --- gluon/shell.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gluon/shell.py b/gluon/shell.py index df7fd2fa..7a56e9b8 100644 --- a/gluon/shell.py +++ b/gluon/shell.py @@ -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)