Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39605

Re: Shebang line on Windows?

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 <zachary.ware@gmail.com>
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 <CAKJDb-NW2ut0=6n_TD3VC=5pR5rc+kOfHANtjVxKB6EtFwtbNw@mail.gmail.com>
References <kg8cm0$flo$1@news.albasani.net> <CAKJDb-NW2ut0=6n_TD3VC=5pR5rc+kOfHANtjVxKB6EtFwtbNw@mail.gmail.com>
From Zachary Ware <zachary.ware+pylist@gmail.com>
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 <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.2294.1361558483.2939.python-list@python.org> (permalink)
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

Show key headers only | View raw


On Fri, Feb 22, 2013 at 12:16 PM, Walter Hurry <walterhurry@lavabit.com> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Shebang line on Windows? Walter Hurry <walterhurry@lavabit.com> - 2013-02-22 18:16 +0000
  Re: Shebang line on Windows? Dave Angel <davea@davea.name> - 2013-02-22 13:40 -0500
  Re: Shebang line on Windows? Zachary Ware <zachary.ware+pylist@gmail.com> - 2013-02-22 12:40 -0600
    Re: Shebang line on Windows? James Harris <james.harris.1@gmail.com> - 2013-02-22 14:53 -0800
      Re: Shebang line on Windows? MRAB <python@mrabarnett.plus.com> - 2013-02-22 23:21 +0000
      RE: Shebang line on Windows? "Sells, Fred" <fred.sells@adventistcare.org> - 2013-02-25 12:35 +0000
      Re: Shebang line on Windows? Dave Angel <davea@davea.name> - 2013-02-25 08:14 -0500
      Re: Shebang line on Windows? Chris Gonnerman <chris@gonnerman.org> - 2013-02-25 07:28 -0600
      Re: Shebang line on Windows? Chris Angelico <rosuav@gmail.com> - 2013-02-26 00:54 +1100
      Re: Shebang line on Windows? Michael Torrie <torriem@gmail.com> - 2013-02-25 10:18 -0700
        Re: Shebang line on Windows? Anssi Saari <as@sci.fi> - 2013-02-26 16:30 +0200
      Re: Shebang line on Windows? "D'Arcy J.M. Cain" <darcy@druid.net> - 2013-02-25 12:29 -0500
        Re: Shebang line on Windows? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-26 00:52 +0000
          Re: Shebang line on Windows? Michael Torrie <torriem@gmail.com> - 2013-02-25 19:08 -0700
          Re: Shebang line on Windows? Dave Angel <davea@davea.name> - 2013-02-25 21:23 -0500
          Re: Shebang line on Windows? MRAB <python@mrabarnett.plus.com> - 2013-02-26 03:08 +0000
          Re: Shebang line on Windows? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-25 22:44 -0500
      Re: Shebang line on Windows? David Robinow <drobinow@gmail.com> - 2013-02-25 13:19 -0500
      Re: Shebang line on Windows? Michael Torrie <torriem@gmail.com> - 2013-02-25 11:29 -0700
      Re: Shebang line on Windows? Michael Torrie <torriem@gmail.com> - 2013-02-25 11:33 -0700

csiph-web