Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2014-10-26 18:37:11 +0300
committerYann Leboulanger <asterix@lagaule.org>2014-10-26 18:37:11 +0300
commit183a5b296a733529f1c5a929ea61ff69fae60eb9 (patch)
tree5a9066e0a130f0a13877faece3609c30a28b5747 /src/ipython_view.py
parentc9b335c0b0b7f41b4b623f3524a9a237e9ede6ca (diff)
[bluec0re] Make ipython_view compatible to version >= 1.0. Fixes #7868
Diffstat (limited to 'src/ipython_view.py')
-rw-r--r--src/ipython_view.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ipython_view.py b/src/ipython_view.py
index 089a5345b..09c16a93b 100644
--- a/src/ipython_view.py
+++ b/src/ipython_view.py
@@ -90,7 +90,10 @@ class IterableIPShell:
@type input_func: function
"""
if input_func:
- IPython.frontend.terminal.interactiveshell.raw_input_original = input_func
+ if IPython.version_info[0] >= 1:
+ IPython.terminal.interactiveshell.raw_input_original = input_func
+ else:
+ IPython.frontend.terminal.interactiveshell.raw_input_original = input_func
if cin:
IPython.utils.io.stdin = IPython.utils.io.IOStream(cin)
if cout:
@@ -110,7 +113,10 @@ class IterableIPShell:
cfg = Config()
cfg.InteractiveShell.colors = "Linux"
- self.IP = IPython.frontend.terminal.embed.InteractiveShellEmbed(config=cfg, user_ns=user_ns)
+ if IPython.version_info[0] >= 1:
+ self.IP = IPython.terminal.embed.InteractiveShellEmbed(config=cfg, user_ns=user_ns)
+ else:
+ self.IP = IPython.frontend.terminal.embed.InteractiveShellEmbed(config=cfg, user_ns=user_ns)
self.IP.system = lambda cmd: self.shell(self.IP.var_expand(cmd),
header='IPython system call: ',
local_ns=user_ns)