[Distutils] small improvement of the script functionality under win32

Bastian Kleineidam calvin at users.sourceforge.net
Sat Apr 2 09:58:57 CEST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On Sat, Apr 02, 2005 at 08:37:33AM +0200, Vivian De Smedt wrote:
> The change in the she bang will happend only if
> - the win32 platform is detected (os.name == "nt")
> - the platform is win NT son (os.environ["OS"] == "Windows_NT")
I suggest using the platform module:

import platform
win_nt_releases = ['NT', 'XP', '2000', '2003Server']
if platform.system() == 'Windows' and platform.release() in win_nt_releases:
    # do it

Regards,
  Bastian
- -- 
  ,''`.                  Bastian Kleineidam
 : :' :                    GnuPG Schlüssel
 `. `'    gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
   `-

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCTlDBeBwlBDLsbz4RAhAhAJ9+zAtHAQOanZssYyGXUlzOD17YCACfT9oS
hC5qSjmJtv9aPIuY3zSphRo=
=3XD4
-----END PGP SIGNATURE-----


More information about the Distutils-SIG mailing list