Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51296
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mail@timgolden.me.uk> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'mrab': 0.05; 'subject:Python': 0.06; 'installed.': 0.07; 'python3': 0.07; 'work!': 0.07; 'collier': 0.09; 'executable': 0.09; 'falls': 0.09; 'skip:/ 10': 0.09; 'wrong,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '2.7': 0.14; 'binary.': 0.16; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'message-id:@timgolden.me.uk': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'symlink': 0.16; 'tjg': 0.16; 'uninstall': 0.16; 'skip:# 20': 0.16; 'wrote:': 0.18; 'command': 0.22; '>>>': 0.22; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'him.': 0.24; 'received:192.168.100': 0.24; 'tells': 0.24; 'file.': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'skip:" 20': 0.27; 'header :In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; "doesn't": 0.30; 'skip:( 20': 0.30; "i'm": 0.30; 'code': 0.31; '3.x': 0.31; 'safely': 0.31; 'file': 0.32; 'run': 0.32; 'another': 0.32; 'there,': 0.34; 'message.': 0.35; 'johnson': 0.35; 'but': 0.35; 'throughout': 0.37; 'manager': 0.38; 'work?': 0.38; 'whatever': 0.38; 'how': 0.40; 'skip:u 10': 0.60; 'hope': 0.61; 'first': 0.61; 'back': 0.62; 'kind': 0.63; 'due': 0.66; 'latest': 0.67; 'from:addr:mail': 0.83; 'to:none': 0.92 |
| Date | Fri, 26 Jul 2013 11:47:24 +0100 |
| From | Tim Golden <mail@timgolden.me.uk> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
| MIME-Version | 1.0 |
| CC | Python Mailing List <python-list@python.org> |
| Subject | Re: Python Script Hashplings |
| References | <51F12B41.3050004@Gmail.com> <51F12E31.1070502@mrabarnett.plus.com> <51F2517D.2070009@Gmail.com> |
| In-Reply-To | <51F2517D.2070009@Gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5143.1374835648.3114.python-list@python.org> (permalink) |
| Lines | 36 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1374835648 news.xs4all.nl 15894 [2001:888:2000:d::a6]:51129 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:51296 |
Show key headers only | View raw
On 26/07/2013 11:37, Devyn Collier Johnson wrote: > > On 07/25/2013 09:54 AM, MRAB wrote: >> On 25/07/2013 14:42, Devyn Collier Johnson wrote: >>> If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) >>> and Python3.3 is not installed, but Python3.2 is installed, would the >>> script still work? Would it fall back to Python3.2? >>> >> Why don't you try it? >> >>> I hope Dihedral is listening. I would like to see another response >>> from HIM. >>> >> > Good point, but if it falls back to Python3.2, how would I know? Plus, I > have Python3.3, 3.2, and 2.7 installed. I cannot uninstall them due to > dependencies. Devyn, I'm not a *nix person so someone can point out if I'm wrong, but my understanding is that the shebang line (or whatever you want to call it) just tells the shell: run this command to run this file. So you can put "#!/usr/bin/fish-and-chips" as the first line and it will try to run the file using /usr/bin/fish-and-chips. If you put #!/usr/bin/python3.3 the shell will use the executable /usr/bin/python3.3. It doesn't know or care about Python or its versions: it won't go looking for some alternative binary. If /usr/bin/python3.3 isn't there, the shell will fail to run the code with some kind of error message. If you or your package manager symlink /usr/bin/python3 to whatever the latest Python 3.x is on your system then you can safely use /usr/bin/python3 throughout and let the symlink do the work! TJG
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python Script Hashplings Tim Golden <mail@timgolden.me.uk> - 2013-07-26 11:47 +0100
csiph-web