def singlesend(self): cmd_text = self.textcombox3.currentText() self.label_showresult.clear() self.label_showmax.setText('') self.label_showmin.setText('') self.label_showmean.setText('') if self.bg.checkedId() != -1: try: t = Fixture().senddir(cmd_text) print(t) num_value = re.compile('[+-][0-9.]+[0-9]+[E|e|^][+-][0-9]+') result = num_value.match(t) if t.startswith('Keysight'): self.label_showresult.appendPlainText(t) return if result.group(0): text = self.changeformat(t) + self.unit self.label_showresult.appendPlainText(text) except Exception as e: self.label_showresult.appendPlainText(str(Exception) + str(e)) elif self.bg.checkedId() == -1: QMessageBox.information(self, '提示', 'Need to choose the testing model', QMessageBox.Ok)