From 7acd33e4b82ede9798df45578693382ebaf28872 2010-08-19 21:38:18
From: Brian Granger <ellisonbg@gmail.com>
Date: 2010-08-19 21:38:18
Subject: [PATCH] Fixing two minor bugs.

* ipapi now returns an InteractiveShell.
* Fixes a problem in ultratb so that %debug now works.

---

diff --git a/IPython/core/ipapi.py b/IPython/core/ipapi.py
index 8e5fef8..0d79aa0 100644
--- a/IPython/core/ipapi.py
+++ b/IPython/core/ipapi.py
@@ -25,6 +25,6 @@ has been made into a component, this module will be sent to deathrow.
 
 def get():
     """Get the global InteractiveShell instance."""
-    from IPython.frontend.terminal.interactiveshell import TerminalInteractiveShell
-    return TerminalInteractiveShell.instance()
+    from IPython.core.interactiveshell import InteractiveShell
+    return InteractiveShell.instance()
 
diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py
index 6cd6042..7606ab6 100644
--- a/IPython/core/ultratb.py
+++ b/IPython/core/ultratb.py
@@ -902,7 +902,7 @@ class VerboseTB(TBTools):
                     self.color_scheme_table.active_scheme_name)
             # the system displayhook may have changed, restore the original
             # for pdb
-            display_trap = DisplayTrap(None, sys.__displayhook__)
+            display_trap = DisplayTrap(hook=sys.__displayhook__)
             with display_trap:
                 self.pdb.reset()
                 # Find the right frame so we don't pop up inside ipython itself