Le mercredi 22 juin 2011 à 23:08 +0100, Colin Guthrie a écrit :
> 'Twas brillig, and David W. Hodgins at 22/06/11 22:51 did gyre and gimble:
> > On Wed, 22 Jun 2011 16:47:40 -0400, Radu-Cristian FOTESCU
> > <beranger...@yahoo.ca> wrote:
> > 
> >> As long as '/usr/bin/env python' _works_, I see no point in trying to
> >> rewrite other people's work.
> > 
> > Excluding the calibre scripts, in /usr/bin of a Mageia 1 kde clean
> > installation ...
> > # grep -I python *|grep '#!'|grep env
> > ebook-convert:#!/usr/bin/env python
> > ebook-device:#!/usr/bin/env python
> > ebook-meta:#!/usr/bin/env python
> > ebook-viewer:#!/usr/bin/env python
> > epub-fix:#!/usr/bin/env python
> > fetch-ebook-metadata:#!/usr/bin/env python
> > gsettings-schema-convert:#!/usr/bin/env python
> > jack_control:#!/usr/bin/env python
> > lrf2lrs:#!/usr/bin/env python
> > lrfviewer:#!/usr/bin/env python
> > lrs2lrf:#!/usr/bin/env python
> > markdown-calibre:#!/usr/bin/env python
> > pdfmanipulate:#!/usr/bin/env python
> > pykdeuic4:#!/usr/bin/env python
> > pykdeuic4:header = """#!/usr/bin/env python
> > web2disk:#!/usr/bin/env python
> > 
> > In general, I agree with you.  If it isn't broken, don't fix it.
> > 
> > However, in this case, the python2 had to be changed to python.
> > 
> > The environment is not being modified, so it is adding an unneeded process,
> > which should be discouraged.
> > 
> > Since you have to change the line anyway, I have to agree with Ahmad, that
> > it should be changed to #!/usr/bin/python.
> 
> 
> I think it's relatively unimportant overall, but:
> 
>  1) /usr/bin/python should be marginally faster
>  2) /usr/bin/python prevents you testing easily with a new python
> version (or just a new build) in a custom prefix).
> 
> So 1) is a (very slight) pro for everyone, but 2) is a pretty big con
> for developers playing with python builds.... of course in that case a
> simple "sudo mv /usr/bin/python /usr/bin/python.orig; ln -s
> /path/to/my/custom/build/of/python /usr/bin/python" should allow said
> developer to test fine.

If python point to a different version ( like some self compiled python
2.6, or python 3 ), I fear that using env will silently break lots of
applications, since the library and modules would likely not be there.


-- 
Michael Scherer

Reply via email to