Commit b19bf40e authored by Julien Muchembled's avatar Julien Muchembled

Add support for IPython >= 1, ignore older versions

parent 8173441b
...@@ -47,12 +47,9 @@ def debugHandler(sig, frame): ...@@ -47,12 +47,9 @@ def debugHandler(sig, frame):
def getPdb(): def getPdb():
try: # try ipython if available try: # try ipython if available
import IPython import IPython
try: shell = IPython.terminal.embed.InteractiveShellEmbed()
shell = get_ipython()
except NameError:
shell = IPython.frontend.terminal.embed.InteractiveShellEmbed()
return IPython.core.debugger.Pdb(shell.colors) return IPython.core.debugger.Pdb(shell.colors)
except ImportError: except (AttributeError, ImportError):
import pdb import pdb
return pdb.Pdb() return pdb.Pdb()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment