Python 3.8+Windowsplatformfunction
platform.win32_edition()
specific operating systems
The Windows edition as a string ('Professional', 'Enterprise', 'ServerStandard'…) or None, including on other OSes.
Syntax
platform.win32_edition()
Unlike win32_ver(), it returns None rather than an empty string on failure, so platform.win32_edition().lower() crashes with AttributeError on Linux. The value comes from the registry and uses internal names: Windows Home is reported as 'Core', not 'Home'.
Examples
import platform
edition = platform.win32_edition()
print(edition) # → ? на Windows, например Professional; на других ОС None
print(edition is None or isinstance(edition, str)) # → True
See also
Open in the full glossarydocs.python.orgReport an inaccuracy