How to find where data files are installed for my Python program

Chris Angelico rosuav at gmail.com
Mon Oct 28 09:06:07 EDT 2013


On Mon, Oct 28, 2013 at 11:51 PM, Roy Smith <roy at panix.com> wrote:
> In article <mailman.1678.1382943105.18130.python-list at python.org>,
>  Chris Angelico <rosuav at 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



More information about the Python-list mailing list