def scanDevices(self):
""" Start 2 threads, one for scanning devices and other for displaying device list on UI
"""
self.counter = self.counter + 1
deviceListChangedEvent = threading.Event()
threadToScanDevices = threading.Thread(target=test_ssdp.main, args=(self.getHostIP(), self.counter, deviceListChangedEvent,))
threadToScanDevices.setDaemon(True)
threadToScanDevices.start()
threadToDisplayDevices = threading.Thread(target=self.displayDevices, args=(deviceListChangedEvent,))
threadToDisplayDevices.setDaemon(True)
threadToDisplayDevices.start()
self.scan.setEnabled(False)
self.cw.btnPushProfile.setEnabled(False)
如何使这个密码正确?在
错误-行太长
您可以通过将行拆分为多行,使用Python在圆括号/方括号/大括号中的隐式行延续来缩短行:
(注意对齐的使用,以明确哪些子线属于一起)。在
或者,将行拆分为多个语句:
^{pr2}$每个PEP-0008应限制为79个字符:
修正“线条过长”错误的方法是-缩短线条!在
由于该行在括号内被打断,Python知道该语句在下一行继续。在
相关问题 更多 >
编程相关推荐