标签:from version number pytho des print table uuid 获取
使用命令行就可以获取到主板相关的信息
wmic csproduct get /value
输出内容如下:
Caption=Computer System Product Description=Computer System Product IdentifyingNumber=PDVC400012152042979202 Name=Veriton M4610G SKUNumber= UUID=A2DC9CC8-30A8-1120-1228-222416000000 Vendor=Acer Version=
iupdatable包对该部分功能进行了封装
安装 iupdatable 包
pip install --upgrade iupdatable
使用实例:
from iupdatable.system.hardware import CSProduct # 一次性获取所有的CSProduct信息 cs_product = CSProduct.get() print("CSProduct: " + str(cs_product)) print(cs_product["Caption"]) # 或者 # 使用各项函数单独获取 print("Caption: " + CSProduct.get_caption()) print("Description: " + CSProduct.get_description()) print("IdentifyingNumber: " + CSProduct.get_identifying_number()) print("Name: " + CSProduct.get_name()) print("SKUNumber: " + CSProduct.get_sku_number()) print("UUID: " + CSProduct.get_uuid()) print("Vendor: " + CSProduct.get_vendor()) print("Version: " + CSProduct.get_version())
输出:
CSProduct: {‘Caption‘: ‘Computer System Product‘, ‘Description‘: ‘Computer System Product‘, ‘IdentifyingNumber‘: ‘PDVC400012152042979202‘, ‘Name‘: ‘Veriton M4610G‘, ‘SKUNumber‘: ‘‘, ‘UUID‘: ‘A2DC9CC8-30A8-1120-1228-222416000000‘, ‘Vendor‘: ‘Acer‘, ‘Version‘: ‘‘} Computer System Product Caption: Computer System Product Description: Computer System Product IdentifyingNumber: PDVC400012152042979202 Name: Veriton M4610G SKUNumber: UUID: A2DC9CC8-30A8-1120-1228-222416000000 Vendor: Acer Version:
[Python] iupdatable包:获取电脑主板信息(csproduct)
标签:from version number pytho des print table uuid 获取
原文地址:https://www.cnblogs.com/IUpdatable/p/12500012.html