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


Groups > comp.lang.python > #52762

Re: default python os x

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'see.': 0.07; 'though:': 0.07; 'bash': 0.09; 'exec': 0.09; 'feature.': 0.09; 'rejected': 0.09; 'cc:addr:python-list': 0.11; 'ah,': 0.16; 'bit...': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'portable,': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subject:default': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'thanks.': 0.20; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'header:In-Reply- To:1': 0.27; 'point': 0.28; 'function': 0.29; 'primarily': 0.30; "d'aprano": 0.31; 'post.': 0.31; 'steven': 0.31; 'uwe': 0.31; 'but': 0.35; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'thank': 0.38; 'received:211': 0.38; 'does': 0.39; 'content-disposition:inline': 0.62; 'said:': 0.68; 'env': 0.84
Date Wed, 21 Aug 2013 20:22:11 +1000
From Cameron Simpson <cs@zip.com.au>
To Uwe Rangs <uwe.rangs@fernuni-hagen.de>
Subject Re: default python os x
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <kuv47h$447$1@news-ailanthus.fernuni-hagen.de>
User-Agent Mutt/1.5.21 (2010-09-15)
References <kuv47h$447$1@news-ailanthus.fernuni-hagen.de>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=uJH_UDQ9r-0A:10 a=uq2vMBLTeh2pNYClek4A:9 a=CjuIK1q_8ugA:10 a=rww32xBZKXsA:10
Cc python-list@python.org
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.76.1377080556.19984.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1377080556 news.xs4all.nl 15920 [2001:888:2000:d::a6]:54491
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52762

Show key headers only | View raw


On 20Aug2013 09:01, Uwe Rangs <uwe.rangs@fernuni-hagen.de> wrote:
| Ah, I see. Thank you!

Please don't top post. Thanks.

| On 2013-08-20 05:39:56 +0000, Steven D'Aprano said:
| >alias python1.5='env -u PYTHONSTARTUP python1.5'

I should point out that -u is a GNU env feature. It is not portable,
and in particular OSX "env" does not have it.

A shell function can do the same though:

  py20() {
    ( unset PYTHONSTARTUP
      exec python2.0 ${1+"$@"}
    )
  }

I've said py20 instead of python2.0 primarily because bash is a
bit... picky about function names and rejected the ".".

Cheers,
-- 
Cameron Simpson <cs@zip.com.au>

But pessimism IS realism!       - D.L.Bahr

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


Thread

default python os x Uwe Rangs <uwe.rangs@fernuni-hagen.de> - 2013-08-19 22:14 +0200
  Re: default python os x Uwe Rangs <uwe.rangs@fernuni-hagen.de> - 2013-08-19 22:24 +0200
    Re: default python os x Steven D'Aprano <steve@pearwood.info> - 2013-08-20 05:39 +0000
      Re: default python os x Uwe Rangs <uwe.rangs@fernuni-hagen.de> - 2013-08-20 09:01 +0200
        Re: default python os x Cameron Simpson <cs@zip.com.au> - 2013-08-21 20:22 +1000
  Re: default python os x Joel Goldstick <joel.goldstick@gmail.com> - 2013-08-19 16:46 -0400

csiph-web