<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Here is a small summary of the remark made arround the she-bang
modification of the windows platform.<br>
<br>
1. Trent let us know that the she-bang modification works only for the
win nt sons and that in general it is better to use the .bat extension
instead of the .cmd one<br>
<br>
2. I realize that we shouldn't change the extension of a script if it
exist since the extention could be usefull to determine which version
of
python to run<br>
&nbsp;- pythonw for the .pyw extention<br>
&nbsp;- python for the .py extention<br>
<br>
According to these remarks and in the purpose to be as conservative as
possible I make this another proposition:<br>
<br>
The change in the she bang will happend only if<br>
&nbsp;- the win32 platform is detected (os.name == "nt")<br>
&nbsp;- the platform is win NT son (os.environ["OS"] == "Windows_NT")<br>
&nbsp;- the original script had no extension (os.path.splitext(outfile)[1]
== "")<br>
<br>
Furthermore I add the %* in the new nt she-bang to let the underlying
script know about command line argument.<br>
<br>
such that the unix she-bang:<br>
<blockquote><tt>#!python foo bar</tt><br>
</blockquote>
will become:<br>
<blockquote><tt>@C:\Python24\Python.exe -x "%%~f0" foo bar %* &amp;
exit /b</tt><br>
</blockquote>
I think that in these conditions the change could only improve the
existing situation at least it improve for some them (Zope, Chetaah,
PyCrust, IPython)<br>
<br>
Tell me what you think about the proposed change.<br>
<br>
Vivian.<br>
<br>
</body>
</html>