Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

runtime warning for possible inputhook collision between pyreadline a…

…nd qt

See #281

closes gh-550
  • Loading branch information...
commit 650ee4b44fe2fb140b8faf746eba6d6a70d11f51 1 parent 272e128
@minrk minrk authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 IPython/lib/
12 IPython/lib/
@@ -17,6 +17,7 @@
import ctypes
import sys
+import warnings
# Constants
@@ -183,6 +184,17 @@ def enable_qt4(self):
from IPython.external.qt_for_kernel import QtCore, QtGui
+ if 'pyreadline' in sys.modules:
+ # see IPython GitHub Issue #281 for more info on this issue
+ # Similar intermittent behavior has been reported on OSX,
+ # but not consistently reproducible
+ warnings.warn("""PyReadline's inputhook can conflict with Qt, causing delays
+ in interactive input. If you do see this issue, we recommend using another GUI
+ toolkit if you can, or disable readline with the configuration option
+ 'TerminalInteractiveShell.readline_use=False', specified in a config file or
+ at the command-line""",
+ RuntimeWarning)
# PyQt4 has had this since 4.3.1. In version 4.2, PyOS_InputHook
# was set when QtCore was imported, but if it ever got removed,
# you couldn't reset it. For earlier versions we can
Please sign in to comment.
Something went wrong with that request. Please try again.