##// END OF EJS Templates
Fix broken links on install/index.rst...
Fix broken links on install/index.rst Currently the links in the section summary on the index.rst/index.html file are broken. Can be reproduced by going to http://ipython.readthedocs.io/en/stable/install/index.html and clicking on *installing IPython itself*, or *kernels for Jupyter* links. Specific changes ---------------- * Added a reference label to the `install.rst` file * Modified links from external link format to Sphinx arbitrary location cross-referencing format in the `index.rst` file Testing ------- Changes have been tested with a local sphinx build through the supplied makefile and specific links touched are fixed. Tested a few possibly overlapping links (Jupyter:install for instance) and they seem to be unaffected by the change.

File last commit:

r22654:e9301c9b
r22679:367c6fe3
Show More
qt.py
25 lines | 900 B | text/x-python | PythonLexer
import sys
from IPython.external.qt_for_kernel import QtCore, QtGui
def inputhook(context):
app = QtCore.QCoreApplication.instance()
if not app:
return
event_loop = QtCore.QEventLoop(app)
if sys.platform == 'win32':
# The QSocketNotifier method doesn't appear to work on Windows.
# Use polling instead.
timer = QtCore.QTimer()
timer.timeout.connect(event_loop.quit)
while not context.input_is_ready():
timer.start(50) # 50 ms
event_loop.exec_()
timer.stop()
else:
# On POSIX platforms, we can use a file descriptor to quit the event
# loop when there is input ready to read.
notifier = QtCore.QSocketNotifier(context.fileno(), QtCore.QSocketNotifier.Read)
notifier.setEnabled(True)
notifier.activated.connect(event_loop.exit)
event_loop.exec_()