如何使用 Squish QT 确定 Python 中的 Windows 版本?
有人知道如何确定 Windows 版本吗?
例如,对于 32 位和 64 位 Windows: - Windows XP 家庭版/专业版 - Windows Vista 商业版/旗舰版...等 - Windows 7 家庭普通版/家庭高级版/专业版/旗舰版...等
我想知道是否可以从注册表或 Python API 检索此信息?
谢谢。
Anyone know how to determine the Windows Edition ??
E.g. for both 32bit and 64bit of Windows:
- Windows XP Home/Professional
- Windows Vista Business/Ultimate...etc
- Windows 7 Home Basic/Home Premium/Professional/Ultimate...etc
I wonder if could retrieve this info from registry or Python API ??
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 ctypes 不起作用(由于 32 位与 64 位?),这个 hack 应该:
或者只是读取注册表:
或者使用这个:
If ctypes doesn't work (due to 32 vs 64 bits?), this hack should:
Or just read the registry:
Or use this:
看看
platform.win32_ver()
。另请参阅如何在Python中检查操作系统是否为Vista?< /a>Take a look at
platform.win32_ver()
. Also, see How to check if OS is Vista in Python?