duelling pythons

Tobias Klausmann klausman-un030402 at tuts.net
Wed Apr 3 15:03:13 EST 2002


Mats Wichmann <mats at laplaza.org> wrote:
> On 3 Apr 2002 08:08:18 GMT, Tobias Klausmann
><klausman-un030402 at tuts.net> wrote:
> 
>:Cliff Wells <logiplexsoftware at earthlink.net> wrote:
>:> On 01 Apr 2002 21:56:44 -0500
>:> nbecker at fred.net wrote:
>:> 
>:>> Keep lobbying Redhat.  The correct solution is for them to put
>:>> 
>:>> #! /usr/bin/python1.5
>:>> 
>:>> If they need a specific version.  I argued this with them already.
>:>> Keep up the pressure.  Maybe they will get it.
>:> 
>:> Absolutely agree.  Or better #!/usr/bin/python.rh with a link python.rh ->
>:> python1.5 so they can eventually upgrade without changing every shebang.
>:
>:In a related matter: how common is /usr/bin/env ?
>:I really like that tool to run python wherever it is: 
>:
>:#!/usr/bin/env python
>:
>:As it is part of sh-utils, I guess it's pretty widely used.
>:
>:Anybody know of specific environments where it is not commonly
>:available?
> 
> Windows :-)

Bah, Windows!

No honest, I don't want to spend the money I would have to if
I'd test my software with WinX. I try to stay as portable as
possible, but if it breaks, I have to rely on users' feedback.

> The thing to remember with env is that it uses the current environment
> to lookup the thing named python.  Which is great if you can precisely
> control this in all cases that matter.  The environment /is/ going to
> be different between your interactive shell and some other program
> started in a different context, such as "cron" (which could be asked
> to run a Python script for you), or a webserver (as in using Python
> for cgi scripts).   That's fine as long as you remember to check what
> "env" will find in non-shell contexts, and make any necessary
> adjustments.

So far, I've only written libraries/modules (no shebang) or console
apps that are at least semi-interactive. But if I'd write some such
utility that might run cronned, I'd surely stumble across the system
where cron doesn't know about /usr/local/bin/python15 =)

Greets,
Tobias



More information about the Python-list mailing list