OS env for Windows

python newbie mesteve_b at hotmail.com
Sun Feb 13 23:14:28 EST 2005


Cool thanks a lot. Always wanted to use win32api module too.
"Tony Meyer" <t-meyer at ihug.co.nz> wrote in message 
news:mailman.2503.1108343952.22381.python-list at python.org...
>> Is there any other way
>> of distinguishing between XP and 2000 I wonder?
>
> WinXP SP2:
>
>>>> import win32api
>>>> major, minor, spack, platform, ver_str = win32api.GetVersionEx()
>>>> print major, minor, spack, platform, ver_str
> 5 1 2600 2 Service Pack 2
>
> WinNT SP4:
>
>>>> import win32api
>>>> major, minor, spack, platform, ver_str = win32api.GetVersionEx()
>>>> print major, minor, spack, platform, ver_str
> 5 0 2195 2 Service Pack 4
>
> =Tony.Meyer
> 





More information about the Python-list mailing list