changeset 4539f519671d in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=4539f519671d description: [bluec0re] Make ipython_view compatible to version >= 1.0. Fixes #7868
diffstat:
src/ipython_view.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 48a980bef230 -r 4539f519671d src/ipython_view.py --- a/src/ipython_view.py Sun Oct 26 16:35:36 2014 +0100 +++ b/src/ipython_view.py Sun Oct 26 16:37:11 2014 +0100 @@ -90,7 +90,10 @@ @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 @@ 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)