In addition to small memory/speed benefits, this makes the intention to use
them as slots more clear.
self.sr_pkg_version = self.context.package_version
self.sr_lib_version = self.context.lib_version
self.sr_pkg_version = self.context.package_version
self.sr_lib_version = self.context.lib_version
def start_sampling(self):
devices = []
for name, options in self.drivers:
def start_sampling(self):
devices = []
for name, options in self.drivers:
self.statusBar().setSizeGripEnabled(False)
self.statusBar().setSizeGripEnabled(False)
def show_about(self):
text = textwrap.dedent('''\
<div align="center">
def show_about(self):
text = textwrap.dedent('''\
<div align="center">
return u'\u221E'
return '{:f}'.format(mag)
return u'\u221E'
return '{:f}'.format(mag)
def update(self, data):
'''Updates the labels with new measurement values.'''
def update(self, data):
'''Updates the labels with new measurement values.'''
self.lblDevName.setText(device)
self.lblTime.setText(now)
self.lblDevName.setText(device)
self.lblTime.setText(now)
def error(self, msg):
'''Error handler for the sampling thread.'''
QtGui.QMessageBox.critical(self, 'Error', msg)
def error(self, msg):
'''Error handler for the sampling thread.'''
QtGui.QMessageBox.critical(self, 'Error', msg)