(self)
| 105 | self._cmdProcess = None |
| 106 | |
| 107 | def on_readyReadStandardOutput(self): |
| 108 | # 读取已有结果 |
| 109 | result = self._cmdProcess.readAllStandardOutput().data() |
| 110 | try: |
| 111 | encoding = chardet.detect(result) |
| 112 | self.resultView.append(result.decode(encoding['encoding'])) |
| 113 | except Exception: |
| 114 | self.resultView.append(result.decode('utf-8', errors='ignore')) |
| 115 | |
| 116 | |
| 117 | if __name__ == '__main__': |