Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'anyway.': 0.05; 'interpreter': 0.05; '21,': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; '"python': 0.16; '(assuming': 0.16; "(it's": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'python),': 0.16; 'scripts.': 0.16; 'specifying': 0.16; 'subject:python': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'command': 0.22; 'example': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; '(by': 0.24; 'fine': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'fine,': 0.31; 'invoke': 0.31; 'fri,': 0.33; 'comment': 0.34; 'received:google.com': 0.35; 'doing': 0.36; 'should': 0.36; 'ahead': 0.38; 'anything': 0.39; 'how': 0.40; 'simply': 0.61; "you're": 0.61; 'mar': 0.68; 'etc),': 0.84; 'ware': 0.91; 'to:none': 0.92 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:cc :content-type; bh=wRf99gMrMNnFY+rGBxerCYaE4aQTwUM87FSSAPU45Dg=; b=VL1skaMbSv7P3uMWo0725CyuZ/kNuQx4FljcQ2E7ziCKc+WLoK9Zx866UgLgUamb4D yGttBhblE6ln/hvI+6Cb82S0j24++cU7RJClMwtWT9/3+C+M3ytT8n2c6/lq2YCPki6f O9ge8g9izpfOKWsWvHvAt9S6JQj5NDk814Nn5x+hc2UKFXojMK8xXDWedjU/IaL4nelM nXh0XDW5cc8t4ipaBoA2tdZeDrVTIq31jf7YeTbtHKGRL7ZWxbJixwEVN4Zwgm3+//k1 y7KfPrKvq286gTfioNxu2PgY81t+Og5PYZlQl93BdZMaPDMCTmZ3fhrifbELHWMTCbDV xOTw== MIME-Version: 1.0 X-Received: by 10.66.164.229 with SMTP id yt5mr49247803pab.67.1395336658682; Thu, 20 Mar 2014 10:30:58 -0700 (PDT) In-Reply-To: References: <87ob10nbeh.fsf@elektro.pacujo.net> Date: Fri, 21 Mar 2014 04:30:58 +1100 Subject: Re: running python 2 vs 3 From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395336668 news.xs4all.nl 2939 [2001:888:2000:d::a6]:50424 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68590 On Fri, Mar 21, 2014 at 4:10 AM, notbob wrote: > On 2014-03-20, Zachary Ware wrote: > >> If you're specifying the interpreter in your command (by calling >> "python .py", etc), the shebang won't mean anything >> anyway. > > DOH! > > I was following you, fine, until that last sentence. Then how should > I invoke the scripts? ....as your example is exactly how I've been > doing it with 2.7, as per Learn Python the Hard Way. Simply > ./.py from the appropriate directory (assuming I keep both > vers in separate dirs)? That's a fine way to do it. Zachary is mentioning an alternative, and showing that the shebang doesn't hurt (it's a comment to Python), so go ahead and put the shebang in all your scripts. ChrisA