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.
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.
see this previous question (and answer):
http://stackoverflow.com/questions/196930/how-to-check-if-os-is-vista-in-python
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