PyDocs

Nav

Python Runtime Services

getwindowsversion

sys

functionWindows
  • getwindowsversion()
Return a named tuple describing the Windows version currently running. The named elements are major, minor, build, platform, service_pack, service_pack_minor, service_pack_major, suite_mask, product_type and platform_version. service_pack contains a string, platform_version a 3-tuple and all other values are integers. The components can also be accessed by name, so sys.getwindowsversion()[0] is equivalent to sys.getwindowsversion().major. For compatibility with prior versions, only the first 5 elements are retrievable by indexing.
Changed in 3.2, 3.6
  • 3.2: Changed to a named tuple and added service_pack_minor, service_pack_major, suite_mask, and product_type.
  • 3.6: Added platform_version
0 Examples
No examples for sys/getwindowsversion.
See Also
No see-alsos for sys/getwindowsversion
0 Notes
No notes for getwindowsversion