How to find out operating system
lhudson at geminidataloggers.com
Thu Jun 27 17:19:21 CEST 2002
If you have PyWin32, try this:
Python 2.0 (#8, Jun 12 2002, 10:20:16) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import win32api
(5, 0, 2195, 2, 'Service Pack 2')
majorVersion: Identifies the major version number of the operating system.
minorVersion: Identifies the minor version number of the operating system.
buildNumber: Identifies the build number of the operating system in
the low-order word. (The high-order word contains the major and minor
platformId: Identifies the platform supported by the operating
system. May be one of VER_PLATFORM_WIN32s, VER_PLATFORM_WIN32_WINDOWS
version: Contains arbitrary additional information about the
> What is the best way of finding out the kind operating system?
> I can use os.name but if the system is Windows I would like also
> know if the system is Windows98 or Windows ME or W2K or
> Windows XP.
> Thanks for help.
More information about the Python-list