摘要: 是根据盘符获取的U盘序列号: import psutil import win32api from io import StringIO def run(): uf = StringIO() while True: disk_list = [] for item in psutil.disk_par 阅读全文
posted @ 2020-05-11 14:01 唐小沫 阅读(2199) 评论(0) 推荐(0) 编辑
摘要: pip install psutil import psutil def run(): while True: for item in psutil.disk_partitions(): if "removable" in item.opts: print("U盘插入") else: print(" 阅读全文
posted @ 2020-05-11 13:47 唐小沫 阅读(2076) 评论(1) 推荐(0) 编辑
摘要: 原文链接:https://www.cnblogs.com/blog-rui/p/12108072.html安装的包pip install wmi pip install pywin32 import wmi c = wmi.WMI() # # 硬盘序列号 for physical_disk in c 阅读全文
posted @ 2020-05-11 13:29 唐小沫 阅读(3146) 评论(0) 推荐(0) 编辑