#!/usr/bin/env python
-
##
## This file is part of the sigrok-meter project.
##
CONFIG is applied to the nth DRIVER. If there are more drivers
than configs, the remaining drivers use the default configuration.
- examples:
+ Examples:
%(prog)s --driver tecpel-dmm-8061-ser:conn=/dev/ttyUSB0
args = parser.parse_args()
if len(args.config) > len(args.driver):
- sys.exit('error: more configurations than drivers given')
+ sys.exit('Error: More configurations than drivers given.')
- # merge drivers and configurations into a list of tuples
+ # Merge drivers and configurations into a list of tuples.
setattr(args, 'drivers', [])
if not args.driver:
args.drivers = default_drivers
- sys.stderr.write('no driver given, using demo driver\n')
+ sys.stderr.write('No driver given, using demo driver.\n')
if args.driver:
args.config.extend([''] * (len(args.driver) - len(args.config)))
args.drivers = zip(args.driver, args.config)
loglevel = sr.LogLevel.get(args.loglevel)
context.log_level = loglevel
except:
- sys.exit('error: invalid log level')
+ sys.exit('Error: invalid log level.')
app = QtGui.QApplication([])
s = mainwindow.MainWindow(context, args.drivers)