Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

inputhookqt4: use InteractiveShell.instance instead of get_ipython

The latter is meant for user code only.
  • Loading branch information...
commit fccb2410c9554a59993b5f4244ddade4ae48f86d 1 parent 1d6e9a0
@cboos authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  IPython/lib/
3  IPython/lib/
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.