Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51308 > unrolled thread
| Started by | Matthew Lefavor <mclefavor@gmail.com> |
|---|---|
| First post | 2013-07-26 10:58 -0400 |
| Last post | 2013-07-26 10:58 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Python Script Hashplings Matthew Lefavor <mclefavor@gmail.com> - 2013-07-26 10:58 -0400
| From | Matthew Lefavor <mclefavor@gmail.com> |
|---|---|
| Date | 2013-07-26 10:58 -0400 |
| Subject | Re: Python Script Hashplings |
| Message-ID | <mailman.5151.1374850755.3114.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
> > > Thanks Matthew Lefavor! But specifically, why use "#!/usr/bin/env python3" > instead of "#!/usr/bin/python3"? > The "env" program looks up its argument in the current $PATH environment variable, and then executes that. This means you aren't necessarily tied to /usr/bin/python3. It makes things more portable. For example, old Linux distributions don't have Python 3 installed with them, and the user might not have permissions to install Python 3 system-wide. Instead they have it in some sort of ~/HOME/bin directory, and then that is placed on the path by their .bashrc file. If your shebang line was "#!/usr/bin/python3", the program wouldn't work without them changing that line. If the shebang ling was "#!/usr/bin/env python3", it would find the Python3 binary no problem.
Back to top | Article view | comp.lang.python
csiph-web