[Distutils] small improvement of the script functionality under win32

Vivian De Smedt vivian at vdesmedt.com
Sat Apr 2 22:36:12 CEST 2005


I'm sorry to be so insistent but it seems to me that my second 
proposition wasn't well understood. My goal wasn't to find the perfect 
solution but just to improve the existing solution in particular for the 
scripts without extensions.

1) Here is a small "demonstration" of my point a demonstration that just 
ask to be contradict :-)

Indeed when a script have no extension it have no chance to be 
understood by any of the version of the win32 platform so it difficult 
to imagine any drawback to a modification of  its she-bang.

Furthermore on all version of NT it provide a working alternative with 
the consequence that the provided patch have benefits and no drawbacks.

I everybody agree with this lets talk of the other scripts we could 
think to modify (the one with extension) or the other sub win32 platform 
we could try to find a solution for.

2) The script with extension (.py, .pyw)

I think that the scripts with extension are pretty well managed on the 
win32 platform. The only drawback of the actual solution is that the 
redirection of the input isn't working and for most scripts it do not 
seems to me a big problem.

Furthermore the extension allows the system to select which version of 
python to run, pythonw.exe for .pyw or python.exe for .py for some of us 
or, python.exe for both .py and .pyw for the one that like to see the 
logs of the .pyw scripts.

At first glance the little advantage combined with a big drawback (but 
this is quit subjective) let me think that we shouldn't try to modify 
the extension of the scripts that have already one.

3) The other sub platforms (Dos, Win95, Win98)

I do have any satisfactory solution maybe the proposition of Phillip J. 
Eby contains idea but not having access to any of these platform I'm in 
a bad position to be able to propose any solutions.

Maybe:

 - adding a .py extension o
 - adding  a .bat extension and  a variation of the she-bang we propose 
for the nt sub platforms

are two improvements interesting improvement we could consider.

The first could also apply to the nt sub platform I personally like more 
my original one since it let the developer the possibility to provide 
scripts that support redirection of the input.

Again sorry to be so insistant and so long being probably so unclear in 
my previous posts.

Vivian.



More information about the Distutils-SIG mailing list