Windows Version

Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

import platform
platform.release()

'XP'

···

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Thomas Heller
Sent: Saturday, February 07, 2004 2:56 PM
To: wxpython-users@lists.wxwindows.org
Subject: [wxPython-users] Re: Windows Version

"M. Vernier" <vernie_m@epita.fr> writes:

  Hello all,

I have some specific code I'd like to execute depending on the windows

version so I did:

  import platform

  release = platform.release()
  if release == '2000':
    ...
  elif release == 'XP':
    ...

This gives '2000' for Windows 2000 and 'XP' for Windows XP for
example.

Are you sure? Here's what I get with Python 2.3.3, on Windows XP:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

c:\>py23
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
win32 Type "help", "copyright", "credits" or "license" for more
information.

import platform
platform.release()

'2000'

The platform module doesn't know about windows XP yet. I have submitted
a bug to SF, but it is not yet accepted.

When I package my app with McMillan Installer on Windows 2000 and run
it on XP, platform.release() returns '2000' instead of 'XP'. What's
the problem?

Thanks

M. Vernier

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org