Nyall Dawson f6269c41da [console] Allow breaking execution of scripts via Ctrl-C
This allows (in some circumstances) scripts running in the console
to be halted via the Ctrl (or Meta) + C shortcut.

(It's only possible to catch and abort when the script is printing
outputs to the console - because this triggers
QCoreApplication.processEvents() calls. Without these calls the
whole QGIS application is unresponsive during script execution
and there's no ability to even catch a shortcut in order to
halt the execution.

Still, even with this limitation it's handy to be able to
break out of lengthy:

for f in iface.activeLayer().getFeatures():
    print(f.attributes())

loops!)
2018-01-30 09:58:31 +10:00
..