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


Groups > comp.lang.python > #86036

Re: Python path on windows

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <davea@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.035
X-Spam-Evidence '*H*': 0.94; '*S*': 0.01; 'scripts': 0.03; 'interpreter': 0.05; 'tree': 0.05; 'subject:Python': 0.06; 'differently.': 0.09; 'exec': 0.09; 'lines.': 0.09; 'skip:# 30': 0.09; 'python': 0.11; 'systems.': 0.12; 'windows': 0.15; 'for,': 0.16; 'subject:windows': 0.16; 'symlink': 0.16; 'appropriate': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'pointed': 0.19; 'header :User-Agent:1': 0.23; 'error': 0.23; 'finally,': 0.24; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'am,': 0.29; 'lines': 0.31; 'run': 0.32; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'should': 0.36; 'to:addr:python-list': 0.38; 'files': 0.38; 'rather': 0.38; 'little': 0.38; 'use.': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'dave': 0.60; 'new': 0.61; 'first': 0.61; 'pays': 0.65; 'charset:windows-1252': 0.65; 'reply': 0.66; 'line,': 0.68; 'reads': 0.68; 'received:74.208': 0.68; 'caused': 0.69; 'attention': 0.75; 'drive.': 0.84; 'angel': 0.91; 'cd-rom': 0.91; 'pc,': 0.91; 'examine': 0.93; 'yours.': 0.93; 'yourself,': 0.95
Date Sat, 21 Feb 2015 09:10:30 -0500
From Dave Angel <davea@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Python path on windows
References <f8c8a373-16e9-41c1-9e5b-37003f7a6c70@googlegroups.com> <54E74A09.1060906@davea.name> <54E8668A.7010204@yahoo.no>
In-Reply-To <54E8668A.7010204@yahoo.no>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:kZpItilOMDQ2CLIr6aAWdARegwcMChuN6Fja1tIdMhi yQ+irVV9xpm78RPS2uSXw51ICk3GKnBUAhPDpiGrRhBrrRHrvE ufL7slsxSv5rfygif9TXa2n3R/E9pdM3a8b5Y/rAkC2/v3wwr4 n52TWVSee7kx8znErIqTv5It8mIQewCqlpcrcefdm9LEDhZ7r4 0emcFUVtL+d/E4rgWekELwaG9Clrn3Prys6K3sfnS1jWmdE+Eh xh5EPBi8l0Xhc3WC4idIhf3+tcV8O1gssYF48J4hHjDRVDP778 ZyMJKY2P52wQ9j7eok87OPfTsBobd1z4BazMIwS+1n88zCoXxp zRmNC5noSUYnnypCp+8w=
X-UI-Out-Filterresults notjunk: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 <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18963.1424527851.18130.python-list@python.org> (permalink)
Lines 40
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1424527851 news.xs4all.nl 2865 [2001:888:2000:d::a6]:52109
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:86036

Show key headers only | View raw


On 02/21/2015 06:05 AM, Gisle Vanem wrote:
> Dave Angel wrote:
>
>> Finally, when py.exe starts, it reads that first (shebang) line, and
>> decides which python interpreter to actually use.
>
> py.exe? Do you mean python.exe?

Reread my post, or read Mark's reply to yours.  The job of py.exe or 
pyw.exe is to examine the shebang line and then exec the appropriate 
python.exe

>
> Is there a way to make python.exe ignore all Shebang lines
> in all scripts? I had many generated .py-files with:
>    #!g:\ProgramFiler\Python27\python.EXE

That's what symlinks are for, on Unix-like systems.  Somewhere I read 
that Windows has had them for a little while now.  Those generated files 
should have pointed to a symlink on your system drive, rather than 
pointing directly to drive G:

But you could always write your own py.exe, which interprets the shebang 
differently.

Or run python.exe yourself, which as far as I know, pays no attention to 
shebang lines.

>
> After transferring my Python tree to a new Win-8.1 PC, my Python
> tree was installed under "f:\ProgramFiler\" and my CD-ROM on "g:\"
>
> This caused those scripts to access my CD-ROM or pop-up a Win-GUI
> error dialogue if no CD-ROM was in the drive. Irritating.
>
>


-- 
DaveA

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


Thread

Python  path on windows loial <jldunn2000@gmail.com> - 2015-02-20 06:43 -0800
  Re: Python  path on windows Dave Angel <davea@davea.name> - 2015-02-20 09:51 -0500
  Re: Python path on windows Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-20 07:54 -0700
    Re: Python path on windows loial <jldunn2000@gmail.com> - 2015-02-20 07:16 -0800
      Re: Python path on windows Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-20 11:25 -0700
      Re: Python path on windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-20 18:31 +0000
      Re: Python path on windows Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-02-20 21:32 +0100
  Re: Python  path on windows wxjmfauth@gmail.com - 2015-02-20 07:20 -0800
  Re: Python path on windows Gisle Vanem <gvanem@yahoo.no> - 2015-02-21 12:05 +0100
  Re: Python path on windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-02-21 12:36 +0000
  Re: Python path on windows Dave Angel <davea@davea.name> - 2015-02-21 09:10 -0500
  Re: Python path on windows Chris Angelico <rosuav@gmail.com> - 2015-02-22 01:40 +1100

csiph-web