[arch-general] shebang for python scripts

Martti Kühne mysatyre at gmail.com
Sun Apr 15 06:36:39 EDT 2012


On Sun, Apr 15, 2012 at 12:36:09PM +0300, Mantas M. wrote:
> On 2012-04-15 07:03, Martti Kühne wrote:
> > #!/usr/bin/env python2 and #!python2 in my experience have exactly the same
> > effect, so all I can do is ask you what differences you found and then we could
> 
[...]
> 
> The difference between "#!/usr/bin/python2" and "#!/usr/bin/env python2"
> becomes obvious when you have multiple `python2`s in your $PATH.
> 
> -- 
> Mantas M. <grawity at gmail.com>

question to OP: what is it you have there in your home directory and would
renaming the binary work for distinction?
~/bin/python2.6, ~/bin/python-frobtweaks

looks like a good measure to me, to just avoid naming collisions if you run
into problems. technically, you don't even need to prepend PATH to break your
python2 searchpath, since a custom-built binary in /usr/local/bin would already
achieve that.

cheers!
mar77i


More information about the arch-general mailing list