[Distutils] small improvement of the script functionality under win32

Vivian De Smedt vivian at vdesmedt.com
Sun Apr 3 08:10:04 CEST 2005


1) Comment on the Phillip J. Eby proposition:

It works well on the nt platform.
 - script execution
 - arguments passing (if less that10 :-) I suppose that the win95, win98 
platform do not support the %* feature)
 - redirection of the input
 - redirection of the output
 - return value (%errorlevel%)

I slightly prefere the following version:

@shift
@python script.py %0 %1 %2 %3 %4 %5 %6 %7 %8 %9

because it do not change the echo flag.

2) Advantage / Drawbacks:

The advantage that I'am able to see are:
 - cross sub platform compatibility
 - close to what have been done by some package manager

The drawback of this solution that I can foreseen are:
 - the scripts can accept only 10 arguments
 - the scripts could not easily be relocated

Because I have too take cross platform into consideration and because I 
don't think relocating these script is really an issue I think the 
solution of Phillip J. Eby is better.

3) Small side remark.

If we go for a solution that output an new file or a one that wasn't 
expected by the developper (script -> script.bat or script -> script and 
script.bat) we should cross check that the developper haven't already 
plan to ouput script.bat.

I says that because some team did choose the solution of Phillip J. Eby 
with variations using sometime python and sometime pythonw according to 
the goal of their scripts and we should let them the flexibility to do that.

Again this is just a side remark because whatever solution will be 
choosed we should probably take care of that.

Vivian.



More information about the Distutils-SIG mailing list