摘要:
是根据盘符获取的U盘序列号: import psutil import win32api from io import StringIO def run(): uf = StringIO() while True: disk_list = [] for item in psutil.disk_par 阅读全文
摘要:
pip install psutil import psutil def run(): while True: for item in psutil.disk_partitions(): if "removable" in item.opts: print("U盘插入") else: print(" 阅读全文
摘要:
原文链接: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 阅读全文