News for hackers. Stuff that matters.
Re:Google's Python style guide by nodata on Thursday April 19, 2012 @05:17AM (#3862074)
Maybe because it's a hack because to get around the following not working?

#!python

Re:Google's Python style guide by rbanffy on Thursday April 19, 2012 @07:19AM (#3862382)
Bad idea. Which python (or program named "python") will run your script?
Re:Google's Python style guide by nodata on Thursday April 19, 2012 @10:00AM (#3863005)
The first python in your path would run the script.
Re:Google's Python style guide by rbanffy on Thursday April 19, 2012 @10:34AM (#3863174)
So, if your PATH gets changed, say, by something that just lept out of your web browser's sandbox, that's the python that'll run your your scripts, right?
Re:Google's Python style guide by nodata on Thursday April 19, 2012 @10:39AM (#3863205)
Yes, that's how it would work, same as with env.
Re:Google's Python style guide by emmelaich on Thursday April 19, 2012 @06:24AM (#3862243)
Yes; #!python should be made to work.

Not to use the user's PATH, but some system ordained python (via some kernel work).

env is a hack.

Re:Google's Python style guide by rbanffy on Thursday April 19, 2012 @11:08AM (#3863353)
> via some kernel work

Kernels shouldn't be aware of the search path shells use.

Re:Google's Python style guide by emmelaich on Friday April 20, 2012 @03:48AM (#3866907)
I agree, as evidenced by the bit you didn't quote. (?!)
Re:Google's Python style guide by nodata on Thursday April 19, 2012 @11:17AM (#3863388)
He may be referring to binfmt.
Re:Google's Python style guide by emmelaich on Friday April 20, 2012 @03:51AM (#3866915)
I wasn't referring to implementation really, but the principle. The main python could be in /bin or /usr/bin or possibly /usr/local/bin. The poor user or developer shouldn't be required to anticipate where and should not need to resort to hacks such as env.