##// END OF EJS Templates
Reduce the number of test on Appveyor....
Reduce the number of test on Appveyor. Appveyor is way slower than Travis, in part because we test on more architecture. In particular 32 and 64 bits. And accumulate delay sometime leading to 30 min between travis success and AppVeyor response. 32 Bits OSes are starting to be rare (or not our target, like tablets). Less that 1/5 market share is some survey, and account for more than 2/3 of our testing time. So slash 3 out of 4 testing on 32 bits. Test only python 3.6 32 bits. (I know that's paradoxal are mostly old system are 32 bits... but do we expect people with old system and old python to use new IPython ?) For example: Windows Arch Share Windows 10 64 bit 36.97% Windows 7 64 bit 32.99% Windows 8.1 64 bit 12.93% Windows 8 64 bit 1.64% Windows Vista 64 bit 0.13% Windows 7 32 bit 6.97% Windows XP 32 bit 2.00% Windows 10 32 bit 1.31% Windows 8.1 32 bit 0.34% Windows Vista 32 bit 0.24% Windows 8 32 bit 0.15% Total about 83ish % of 64 bits. Source: http://www.digitaltrends.com/computing/steam-users-windows-10-market-share/ and http://store.steampowered.com/hwsurvey?platform=pc

File last commit:

r22707:3a42b331
r23236:a8f84d57
Show More
qt.py
30 lines | 1.0 KiB | text/x-python | PythonLexer
import sys
from IPython.external.qt_for_kernel import QtCore, QtGui
# If we create a QApplication, keep a reference to it so that it doesn't get
# garbage collected.
_appref = None
def inputhook(context):
global _appref
app = QtCore.QCoreApplication.instance()
if not app:
_appref = app = QtGui.QApplication([" "])
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_()