What is an easy (to implement) way to check whether I am on Windows Vista or Windows Server 2008 from a Python script?
platform.uname() gives the same result for both versions.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As mentioned in the other question the foolproof (I think) way is to use win32api.GetVersionEx(1). The combination of the version number and the product type will give you the current windows platform you’re running on. Eg. the combination of version number ‘6.*’ and product type VER_NT_SERVER is Windows Server 2008.
You can find information about the different combinations you can get at msdn