Message48089
| Author |
vds2212 |
| Recipients |
| Date |
2005年04月02日.06:39:41 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=511447
Here is a small summary of the remark made arround
the she-bang modification of the windows platform.
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
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
- pythonw for the .pyw extention
- python for the .py extention
According to these remarks and in the purpose to be
as conservative as possible I make this another
proposition:
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")
- the original script had no extension (os.path.
splitext(outfile)[1] == "")
Furthermore I add the %* in the new nt she-bang to let
the underlying script know about command line
argument.
such that the unix she-bang:
#!python foo bar
will become:
@C:\Python24\Python.exe -x "%%~f0" foo bar %* &
exit /b
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)
Tell me what you think about the proposed change.
Vivian.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:42:29 | admin | link | issue1173134 messages |
| 2007年08月23日 15:42:29 | admin | create |
|