[Distutils] small improvement of the script functionality under win32

Phillip J. Eby pje at telecommunity.com
Sat Apr 2 10:06:30 CEST 2005


At 08:37 AM 4/2/05 +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")

You really need to check that COMSPEC points to cmd.exe, since as someone 
pointed out you can actually have an NT machine using command.com as its 
COMSPEC, which means it won't be able to run this either.

And whatever environment variable, you need to handle the case where it 
doesn't exist. My Win 98 machine has no 'OS' variable, for example.



More information about the Distutils-SIG mailing list