摘要: 对C语言,static声明一个静态变量,存储方式为静态存储方式,与全局变量存储方式一致,存储在数据区 静态局部变量,声明时若未赋初值,默认赋初值0,静态局部变量只进行一次赋初值,在多次调用一个函数时,该函数中定义的静态局部变量会保留上次该函数调用时的值。其作用域为该函数,退出后不可再被调用,但该变量 阅读全文
posted @ 2022-05-18 14:08 王大老爷 阅读(203) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/muxinyue/p/4786788.html https://www.freesion.com/article/1469893643/ 阅读全文
posted @ 2022-05-11 18:04 王大老爷 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: 条件语句 1. >>> a = 3>>> b = 4>>> c = a if a < b else b>>> print(c)3 2. >>> m=4>>> n=2>>> ('n', 'm')[m > n]'m' 实质是索引的使用 3. >>> m = 4>>> n = 5>>> m > n and 阅读全文
posted @ 2021-12-17 13:50 王大老爷 阅读(23) 评论(0) 推荐(0) 编辑