Permalink
Browse files

inputhookqt4: use InteractiveShell.instance instead of get_ipython

The latter is meant for user code only.
  • Loading branch information...
1 parent 1d6e9a0 commit fccb2410c9554a59993b5f4244ddade4ae48f86d @cboos committed Oct 19, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 IPython/lib/inputhook.py
View
@@ -188,7 +188,8 @@ def safe_callback():
safe_callback.wrapped = callback
# register _restore_inputhook() method as a 'pre_prompt_hook' (once)
- ip = get_ipython()
+ from IPython.core.interactiveshell import InteractiveShell
+ ip = InteractiveShell.instance()
if not hasattr(ip, '_InputHookManager_preprompthook'):
ip.set_hook('pre_prompt_hook', self._restore_inputhook)
ip._InputHookManager_preprompthook = True

0 comments on commit fccb241

Please sign in to comment.