摘要: class mainWindow(Tk): def __init__(self, master=None): self.EEImportTag = False # EE文件是否导入标志 Tk.__init__(self, master) # # 有屏幕大小获取界面大小 self.autoTestWi 阅读全文
posted @ 2022-03-04 18:08 王大老爷 阅读(52) 评论(0) 推荐(0) 编辑
摘要: # CRC校验def CRCconfirm(): string = con_entry1.get() string = string.replace(' ', '') data = bytearray.fromhex(string) crc = 0xFFFF for pos in data: crc 阅读全文
posted @ 2022-03-04 17:34 王大老爷 阅读(80) 评论(0) 推荐(0) 编辑
摘要: class DateTransfer(): # # 二进制、十进制、十六进制、数字、字符串相互转换 # 将16进制字符串转化为对应的数字 def str2hex(self, s): data = 0 su = s.upper() for _ in su: data = data << 4 if _ 阅读全文
posted @ 2022-03-04 17:32 王大老爷 阅读(43) 评论(0) 推荐(0) 编辑
摘要: rmdir /s/q .\build & pyinstaller --clean -w -n test -D -p .\venv\Lib\site-packages --distpath dist --noconfirm autoTestWindow.py 阅读全文
posted @ 2022-03-04 17:31 王大老爷 阅读(16) 评论(0) 推荐(0) 编辑
摘要: from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image, PageBreak, Table, TableStylefrom reportlab.lib.styles import ParagraphStyl 阅读全文
posted @ 2022-03-04 17:29 王大老爷 阅读(27) 评论(0) 推荐(0) 编辑
摘要: class myLogger(): def __init__(self, name, logtype, logpath): self.mylogger = logging.getLogger(name) self.mylogger.setLevel(level=logging.INFO) self. 阅读全文
posted @ 2022-03-04 17:28 王大老爷 阅读(30) 评论(0) 推荐(0) 编辑
摘要: class mySerial(Serial): myIndoorMonitor = indoorMonitor() myOutdoorMonitor = outdoorMonitor() def __init__(self, com, baudrate=9600, bytesize=8, parit 阅读全文
posted @ 2022-03-04 17:27 王大老爷 阅读(25) 评论(0) 推荐(0) 编辑