##
import argparse
-import sigrok.core as sr
import sys
import textwrap
import signal
qtcompat.load_modules(args.pyside)
QtCore = qtcompat.QtCore
QtGui = qtcompat.QtGui
- import mainwindow
app = QtGui.QApplication([])
+ try:
+ import sigrok.core as sr
+ except Exception as e:
+ QtGui.QMessageBox.critical(None, 'Error starting sigrok-meter',
+ 'Unable to use the sigrok python bindings:\n{}'.format(e))
+ sys.exit(1)
+
# Initialize modules that need a QApplication to exist.
import settings
settings.init()
except:
sys.exit('Error: invalid log level.')
+ import mainwindow
s = mainwindow.MainWindow(context, args.drivers)
s.show()