Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.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; 'interpreter': 0.04; 'linux,': 0.05; 'executable': 0.07; 'subject:Windows': 0.09; 'python': 0.09; '22,': 0.09; 'command.': 0.09; 'scripts,': 0.09; 'whichever': 0.09; 'itself.': 0.11; 'later': 0.16; 'wrote:': 0.17; 'sender:addr:gmail.com': 0.18; 'windows': 0.19; 'feb': 0.19; '2.x': 0.22; '3.x': 0.22; 'this:': 0.23; 'machine': 0.24; 'script': 0.24; 'header:In-Reply-To:1': 0.25; '[1]': 0.27; 'question': 0.27; 'executing': 0.27; 'message-id:@mail.gmail.com': 0.27; 'fri,': 0.30; 'url:python': 0.32; 'launch': 0.32; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'path': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'add': 0.36; 'but': 0.36; 'url:org': 0.36; 'anything': 0.36; 'being': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'son': 0.60; 'effective': 0.63; 'fact,': 0.69; '2013': 0.84; 'ok?': 0.84; 'ships': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=f0Lf2HaAE6ikXpRvRaRAYeuubh9b64ljbfqFCzf5ppE=; b=ZrkssOPmLS6uWdB0buscbg9a774bNygboVTfjXfFzAPMPM4mUpm5RMcCalAjH4b9Mn NRmGuDFqALfJ2aus8mli71w37jz42dpM3JsDH3936xKp+YgNW5U85ADIXJDSghv53RMB TgFqoHMYvAvwH/reoGdXJDm75PxoxVtVKn2HtfDkgqf/bn/cGYxWPhTQwQOaN43gdAtt WhYTmjgOqJ95Z4osqBtBvEH1oJiSb4+i3rd62MY+cYM70QBPUi5NCxzM1ebEo0dF6C5i 9RqEIpbXlzHU+pIHgGLJRMG746SltUw+/dYfTYpgKjR/1+hn6KBYHreQTlMGKP1k9S0v K95Q== X-Received: by 10.205.120.15 with SMTP id fw15mr1476013bkc.108.1361558474198; Fri, 22 Feb 2013 10:41:14 -0800 (PST) MIME-Version: 1.0 Sender: zachary.ware@gmail.com In-Reply-To: References: From: Zachary Ware Date: Fri, 22 Feb 2013 12:40:53 -0600 X-Google-Sender-Auth: kspaPaYGVgDndAgPkbDyt4IOiZA Subject: Re: Shebang line on Windows? 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: 1361558483 news.xs4all.nl 6977 [2001:888:2000:d::a6]:50755 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39605 On Fri, Feb 22, 2013 at 12:16 PM, Walter Hurry wrote: > I use FreeBSD or Linux, but my son is learning Python and is using > Windows. > > My question is this: Would it be good practice for him to put #!/usr/bin/ > env python at the top of his scripts, so that if made executable on *nix > they will be OK? As I understand it this will have no effect on Windows > itself. Adding the shebang line on Windows would be excellent practice. In fact, Python 3.3 and later ships with the Python Launcher for Windows [1] which is very effective at reading the shebang line and executing the script with the proper Python installation. It makes using Python 2.x and 3.x on the same Windows machine much less painful, as well as not having to add anything to the PATH and being able to launch whichever interpreter you want with a single command. [1] http://docs.python.org/3/using/windows.html#python-launcher-for-windows