Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #70504 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-04-22 22:26 +1000 |
| Last post | 2014-04-23 02:42 +0100 |
| Articles | 3 — 2 participants |
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: Strange syntax error, occurs only when script is executed directly [solved] Chris Angelico <rosuav@gmail.com> - 2014-04-22 22:26 +1000
Re: Strange syntax error, occurs only when script is executed directly [solved] Andrew Cooper <root@127.0.0.1> - 2014-04-23 02:42 +0100
Re: Strange syntax error, occurs only when script is executed directly [solved] Andrew Cooper <root@127.0.0.1> - 2014-04-23 02:42 +0100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-04-22 22:26 +1000 |
| Subject | Re: Strange syntax error, occurs only when script is executed directly [solved] |
| Message-ID | <mailman.9437.1398169617.18130.python-list@python.org> |
On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon <antoon.pardon@rece.vub.ac.be> wrote: > Yes that was it. I changed the first line of my script to: > > #!/opt/local/bin/python2.7 > > and it now works. Excellent! Shebangs are *extremely* specific, so you may want to consider using "/usr/bin/env python" to get a bit more flexibility. (Or "python2" or "python2.7" in place of "python", depending on how specific you want to be.) ChrisA
[toc] | [next] | [standalone]
| From | Andrew Cooper <root@127.0.0.1> |
|---|---|
| Date | 2014-04-23 02:42 +0100 |
| Message-ID | <53571A75.8090902@127.0.0.1> |
| In reply to | #70504 |
On 22/04/2q014 13:26, Chris Angelico wrote: > On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon > <antoon.pardon@rece.vub.ac.be> wrote: >> Yes that was it. I changed the first line of my script to: >> >> #!/opt/local/bin/python2.7 >> >> and it now works. > > Excellent! Shebangs are *extremely* specific, so you may want to > consider using "/usr/bin/env python" to get a bit more flexibility. > (Or "python2" or "python2.7" in place of "python", depending on how > specific you want to be.) > > ChrisA > `man execve` "The interpreter must be a valid pathname for an executable which is not itself a script." This is (presumably) to avoid recursive walks of the filesystem trying to locate a valid interpreter to splat over the virtual address space of the currently executing process. ~Andrew
[toc] | [prev] | [next] | [standalone]
| From | Andrew Cooper <root@127.0.0.1> |
|---|---|
| Date | 2014-04-23 02:42 +0100 |
| Message-ID | <cUE5v.46172$_m3.5204@fx02.am4> |
| In reply to | #70504 |
On 22/04/2q014 13:26, Chris Angelico wrote: > On Tue, Apr 22, 2014 at 10:21 PM, Antoon Pardon > <antoon.pardon@rece.vub.ac.be> wrote: >> Yes that was it. I changed the first line of my script to: >> >> #!/opt/local/bin/python2.7 >> >> and it now works. > > Excellent! Shebangs are *extremely* specific, so you may want to > consider using "/usr/bin/env python" to get a bit more flexibility. > (Or "python2" or "python2.7" in place of "python", depending on how > specific you want to be.) > > ChrisA > `man execve` "The interpreter must be a valid pathname for an executable which is not itself a script." This is (presumably) to avoid recursive walks of the filesystem trying to locate a valid interpreter to splat over the virtual address space of the currently executing process. ~Andrew
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web