在 Python 中获取处理器信息 [英] Getting processor information in Python
本文介绍了在 Python 中获取处理器信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
用Python有什么办法可以查到处理器信息...(我需要名字)
我需要运行解释器的处理器的名称.我检查了 sys 模块,但它没有这样的功能.
如果需要,我也可以使用外部库.
解决方案
平台.processor() 函数以字符串形式返回处理器名称.
<预><代码>>>>进口平台>>>平台.处理器()'Intel64 家族 6 模型 23 步进 6,正版英特尔'Using Python is there any way to find out the processor information... (I need the name)
I need the name of the processor that the interpreter is running on. I checked the sys module but it has no such function.
I can use an external library also if required.
解决方案
The platform.processor() function returns the processor name as a string.
>>> import platform
>>> platform.processor()
'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel'
这篇关于在 Python 中获取处理器信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文