Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #57819
| References | (6 earlier) <7w7gcy9tpk.fsf@benfinney.id.au> <CAPTjJmp_npLE7xGPXPib16dTqomULRv8xOVuPGizruomnjUX3g@mail.gmail.com> <l4kbe4$na4$1@ger.gmane.org> <mailman.1678.1382943105.18130.python-list@python.org> <roy-A1F547.08515328102013@news.panix.com> |
|---|---|
| Date | 2013-10-29 00:06 +1100 |
| Subject | Re: How to find where data files are installed for my Python program |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1699.1382965577.18130.python-list@python.org> (permalink) |
On Mon, Oct 28, 2013 at 11:51 PM, Roy Smith <roy@panix.com> wrote: > In article <mailman.1678.1382943105.18130.python-list@python.org>, > Chris Angelico <rosuav@gmail.com> wrote: > >> If it starts with "#!/usr/bin/python", it'll get >> dropped through to Python for execution. > > Even better (for most purposes), use "#!/usr/bin/env python". What that > does is (slight handwave here) search your PATH to find the same version > of Python you would get if you typed "python" at a shell prompt. Yeah, I'm aware of that... but I dodged a bit of complexity by hard-coding the path :) The shebang you quote drops it through to env, which waves its hands vigorously and says "Abracadabra", before dropping it through to the Python that you forgot you ran 'make install' instead of 'make altinstall' on. :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-26 19:23 -0700
Re: Function for the path of the script? Skip Montanaro <skip.montanaro@gmail.com> - 2013-10-26 21:42 -0500
Re: Function for the path of the script? Gary Herron <gary.herron@islandtraining.com> - 2013-10-26 19:52 -0700
Re: Function for the path of the script? Chris Angelico <rosuav@gmail.com> - 2013-10-27 14:01 +1100
Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-28 14:49 +0000
Re: Function for the path of the script? Chris Angelico <rosuav@gmail.com> - 2013-10-29 01:59 +1100
Re: Function for the path of the script? rurpy@yahoo.com - 2013-10-28 21:00 -0700
Re: Function for the path of the script? Steven D'Aprano <steve@pearwood.info> - 2013-10-29 05:27 +0000
Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-29 14:31 +0000
Re: Function for the path of the script? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-27 03:42 +0000
Re: Function for the path of the script? Ben Finney <ben+python@benfinney.id.au> - 2013-10-27 15:10 +1100
Re: Function for the path of the script? Roy Smith <roy@panix.com> - 2013-10-27 09:38 -0400
Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-28 14:58 +0000
Re: Function for the path of the script? Ben Finney <ben+python@benfinney.id.au> - 2013-10-29 09:50 +1100
Re: Function for the path of the script? Grant Edwards <invalid@invalid.invalid> - 2013-10-29 14:26 +0000
How to find where data files are installed for my Python program (was: Function for the path of the script?) Ben Finney <ben+python@benfinney.id.au> - 2013-10-27 15:28 +1100
Re: How to find where data files are installed for my Python program (was: Function for the path of the script?) rurpy@yahoo.com - 2013-10-26 22:18 -0700
Re: How to find where data files are installed for my Python program Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-10-27 20:58 +1300
Re: How to find where data files are installed for my Python program Ian Kelly <ian.g.kelly@gmail.com> - 2013-10-27 09:50 -0600
Re: How to find where data files are installed for my Python program Ben Finney <ben+python@benfinney.id.au> - 2013-10-28 10:13 +1100
Re: How to find where data files are installed for my Python program Ben Finney <ben+python@benfinney.id.au> - 2013-10-28 10:31 +1100
Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-28 10:58 +1100
Re: How to find where data files are installed for my Python program Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-28 00:34 +0000
Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-28 17:51 +1100
Re: How to find where data files are installed for my Python program Roy Smith <roy@panix.com> - 2013-10-28 08:51 -0400
Re: How to find where data files are installed for my Python program Chris Angelico <rosuav@gmail.com> - 2013-10-29 00:06 +1100
Re: How to find where data files are installed for my Python program (was: Function for the path of the script?) Chris Angelico <rosuav@gmail.com> - 2013-10-27 16:49 +1100
Re: Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-28 15:57 -0700
Re: Function for the path of the script? Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-10-28 22:56 -0700
csiph-web