Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'scripts': 0.03; 'subject:Python': 0.06; 'executable': 0.09; 'variable,': 0.09; 'python': 0.11; 'subject:windows': 0.16; 'url:windows': 0.16; 'windows?': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'email addr:gmail.com>': 0.22; '>': 0.26; 'equivalent': 0.26; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'linux': 0.33; 'url:python': 0.33; 'skip:# 10': 0.33; 'received:google.com': 0.35; 'version': 0.36; 'url:org': 0.36; 'skip:& 10': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'ensure': 0.60; 'url:3': 0.61; '20,': 0.68; '2015': 0.84 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=4HTd086KRHzpt2DqPGAX1lr5Hj8WNajjoqzcsDqLUEI=; b=iaQgkpbZtci6oQt4XkYDW0Do6AmZU16qI47aO4gTeQJLyfajrYhxW3tD1SB67Ge/Pe eViH8JhTqn+VXmR4+ZYZrgX6rZNJ8CJrIJMZ9OxX/udW9mG0k8cl0hyVhcokfKqTK+1v VMhrl5Y/1RzFELjPRstgjVFjSlKVrRwO43WloKxp3fjRmG8GHe+BbRbGLFpl1Q3whaGV biDyH7bJ9Mx4hntGYuLMnSP4ke7JL4lEsTJTh0PoTGLMFmc1mNkV6rwBnzyDJZGeVJb/ tmNZUR294ct8OfZccnREz9pU2icwhj1Esarb0dAQUNHfdDcM9cHja0DftnE78raMRdFH BURg== MIME-Version: 1.0 X-Received: by 10.68.197.161 with SMTP id iv1mr17171139pbc.147.1424444051609; Fri, 20 Feb 2015 06:54:11 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Feb 2015 07:54:11 -0700 Subject: Re: Python path on windows From: Ian Kelly To: Python Content-Type: multipart/alternative; boundary=e89a8ff1cac8b2e115050f86390f 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424444054 news.xs4all.nl 2902 [2001:888:2000:d::a6]:60397 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:85975 --e89a8ff1cac8b2e115050f86390f Content-Type: text/plain; charset=UTF-8 On Feb 20, 2015 7:46 AM, "loial" wrote: > > On Linux we use > #!/usr/bin/env python > > At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python executable. > > What is the equivalent functionality in Windows? https://docs.python.org/3/using/windows.html#launcher Note that while the launcher can be used with any version of Python, it is only packaged with 3.3+. --e89a8ff1cac8b2e115050f86390f Content-Type: text/html; charset=UTF-8

On Feb 20, 2015 7:46 AM, "loial" <jldunn2000@gmail.com> wrote:
>
> On Linux we use
> #!/usr/bin/env python
>
> At the start of scripts to ensure that the python executable used is the one defined in the PATH variable, rather than hardcoding a path to the python executable.
>
> What is the equivalent functionality in Windows?

https://docs.python.org/3/using/windows.html#launcher

Note that while the launcher can be used with any version of Python, it is only packaged with 3.3+.

--e89a8ff1cac8b2e115050f86390f--