gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] Fixes shebang line in devtools/striplog.


From: Fred Wright
Subject: Re: [gpsd-dev] [PATCH] Fixes shebang line in devtools/striplog.
Date: Wed, 13 Apr 2016 15:27:08 -0700 (PDT)

On Wed, 13 Apr 2016, Gary E. Miller wrote:
> On Wed, 13 Apr 2016 13:13:42 -0700
> Fred Wright <address@hidden> wrote:
>
> > This was using the less reliable non-env version of the Python shebang
> > line.  The fix was neglected in the previous commit.
>
> > -#!/usr/bin/python
> > +#!/usr/bin/env python
>
> I do not understand this.  Looking at the man page, all env seems to
> do is run the command with a changed environment,

It runs 'python' as found in your PATH, rather than using the specific
path in the former version, which might not even exist if that's not where
your default Python is installed.  See, e.g.:

http://stackoverflow.com/questions/2429511/why-do-people-write-usr-bin-env-python-on-the-first-line-of-a-python-script

Also, all the other Python programs here use the preferred form.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]