[issue7863] platform module doesn't detect Windows 7
report at bugs.python.org
Thu Feb 25 21:46:33 CET 2010
Brian Curtin <curtin at acm.org> added the comment:
This patch should cover everything, and it works with 2.6 as well. In order to figure out workstation vs. server, it uses the ProductName from the registry when it can't the info from getwindowsversion. If it finds a server name, it's a server, otherwise fallback to be a workstation.
This was able to correctly differentiate Vista and Server 2008. I don't have access to Server 2008 R2, but I can't imagine it missing a registry key that exists on every computer I looked at (XP, 2003, Vista, 2008, 7).
Added file: http://bugs.python.org/file16371/issue7863.diff
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list