delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/01/10:58:01

X-Spam-Check-By: sourceware.org
Message-ID: <4637551D.1020302@cwilson.fastmail.fm>
Date: Tue, 01 May 2007 10:56:29 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [Ping Python maintainer]: enhancement request
References: <f137va$5ar$1 AT sea DOT gmane DOT org> <20070501120623 DOT GA3824 AT tishler DOT net> <20070501133951 DOT GB17841 AT trixie DOT casa DOT cgf DOT cx> <463747BC DOT 3050002 AT cwilson DOT fastmail DOT fm> <04ca01c78bfb$39c7b530$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <20070501143305 DOT GF17841 AT trixie DOT casa DOT cgf DOT cx>
In-Reply-To: <20070501143305.GF17841@trixie.casa.cgf.cx>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Christopher Faylor wrote:
> On Tue, May 01, 2007 at 03:15:52PM +0100, Dave Korn wrote:
>> On 01 May 2007 14:59, Charles Wilson wrote:
>>> Because python is a command interpreter,
> 
>>> Similarly, sh.exe
>> I think these are two very strong arguments in favour.
> 
> python.exe isn't anything like the interactive shell that people use on
> a day to day basis and simply stating that it is doesn't mean that it is.

Just to clarify, when I say command interpreter I wasn't necessarily 
implying interactive -- just as nobody (I hope) attempts to use /bin/sh 
in its pure, restricted posix mode, as their native interactive shell. 
[side note: IPython, an interactive shell-like python environment -- is 
really cool].  I just meant that python /interprets/ /commands/ 
(possibly -- usually -- in a script).

For ActivePython, you'll see win32 shortcuts with target:

<path-to-active>/python.exe <some script>

If cygwin's 'python' is a copy of version x.y, then cygwin users can do 
the same: have win32 shortcuts with target:

<path-to-cygwin>/python.exe <some script>

(Now, ActivePython sometimes cheats: it associates .py with itself, and 
often win32 pythoners will just give their scripts a name with that 
extension.  And obviously, windows doesn't, itself, recognize shbang lines)

Granted, there are 57 other, different solutions that don't require 
cygwin's 'python' to be a copy, like invoke version x.y directly from 
the shortcut:

<path-to-cygwin>/python2.5 <some script>

or cgf's use-bash-first:

<path-to-cygwin>/bash.exe python <some script>

or use-bash-first and rely on shbang:
<path-to-cygwin>/bash.exe <some script with #!/bin/python>


But if cygwin does the copy thing, we'd be following the 'principle of 
least surprise' for ActivePython folks (AP is, after all, the other 
major python implementation on win32; IronPython is coming along nicely, 
tho).


'invoke from native win32' means 'from a shortcut OR cmd window' not 
just 'from a cmd window'

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019