''' @author: olivier.massot, mars 2017 ''' import sys from PyQt5.Qt import QApplication, QMessageBox # import ipdb from Viewer import Viewer if __name__ == '__main__': app = QApplication(sys.argv) iface = Viewer() iface.show() SYS_HOOK = sys.excepthook def error_handler(typ, value, trace): QApplication.restoreOverrideCursor() QMessageBox.critical(iface, typ.__name__, "{}".format(value)) SYS_HOOK(typ, value, trace) sys.excepthook = error_handler r = app.exec_() sys.exit(r)