Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.01; 'subject:Python': 0.06; 'subject:files': 0.09; 'typed': 0.09; 'yeah,': 0.09; 'subject:How': 0.10; 'python': 0.11; '"python"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'python".': 0.16; 'roy': 0.16; 'subject:program': 0.16; 'subject:where': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'starts': 0.20; 'shell': 0.22; 'mon,': 0.24; '(for': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'forgot': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'dropped': 0.31; 'says': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'subject:data': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'quote': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'most': 0.60; 'smith': 0.68; 'article': 0.77; 'complexity': 0.84; 'execution.': 0.84; 'here)': 0.84; 'subject:find': 0.84; 'drops': 0.91; 'hands': 0.96; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=d9SR+CpGSS2W9Sfnyd+w96WpEhKP1UuNPu0biZrgFHg=; b=Rt12cSd6WbXuReA+frMRtz1/QEvDpm0rXkdvTWplHg1m0ZRVFcrLF/oybtZ+UBWq19 epHblgkld/w8sSo2zBHIiL66Y8GgItfCxHJHHKwajSPen9O1zzCSReOLXYkIom/caC0T +T6o7uMHh8YM7rqTwD4vYLKQWdunedemltazRml/gaCQFzLtEbZ6jE8uThKRez296ojX yjjyFDjSN/BgkFhzgmggAaswT4fCCWB3dqAzJaJ3GW7FqLeTG+bgCSnKssVtF9kz585t 6yJynuWOsKNQ5DA7laPUpeKWyM8dRrQuMjHs5eajNhTFL4w65YsND8ScWgUTjNfY3n/d K0ug== MIME-Version: 1.0 X-Received: by 10.66.163.2 with SMTP id ye2mr1810431pab.170.1382965567618; Mon, 28 Oct 2013 06:06:07 -0700 (PDT) In-Reply-To: References: <00704f33-7e7f-4ccf-b28b-69776d2e237d@googlegroups.com> <526C7FEF.7020206@islandtraining.com> <7w7gcy9tpk.fsf@benfinney.id.au> Date: Tue, 29 Oct 2013 00:06:07 +1100 Subject: Re: How to find where data files are installed for my Python program From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382965577 news.xs4all.nl 15872 [2001:888:2000:d::a6]:41515 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57819 On Mon, Oct 28, 2013 at 11:51 PM, Roy Smith wrote: > In article , > Chris Angelico 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