Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.04; 'python': 0.08; 'scripts': 0.09; '32-bit': 0.09; 'etc).': 0.09; 'received:209.85.160.174': 0.09; 'received:mail- gy0-f174.google.com': 0.09; 'wed,': 0.12; 'am,': 0.13; 'wrote:': 0.15; '3.2.1': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ie.': 0.16; 'installed,': 0.16; 'installs': 0.16; 'overwriting': 0.16; 'subject:ActivePython': 0.16; 'subject:versions': 0.16; '\xa0you': 0.16; 'appropriate': 0.20; 'seems': 0.20; 'variable': 0.21; "doesn't": 0.22; 'header:In- Reply-To:1': 0.22; '64-bit': 0.23; 'builds': 0.23; 'pair': 0.23; 'message-id:@mail.gmail.com': 0.28; 'script': 0.29; '27,': 0.29; 'shell': 0.29; 'variables': 0.29; 'environment': 0.29; 'skip:( 20': 0.30; 'fairly': 0.30; 'invoke': 0.30; 'version': 0.30; 'looks': 0.30; 'separate': 0.31; 'subject:?': 0.31; 'external': 0.33; 'to:addr:python-list': 0.34; 'received:209.85.160': 0.34; 'stopping': 0.35; '(not': 0.35; 'probably': 0.35; 'some': 0.37; 'could': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'two': 0.38; 'put': 0.38; 'easier': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; 'possibility': 0.40; 'your': 0.60; 'back': 0.63; 'according': 0.63; 'restore': 0.64; 'order,': 0.73; 'low': 0.74; "'em": 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=GmkDozHvnPL/Kbh6BSs6sBhTrXTxUBHxQblIZZNVJoA=; b=lv58GvN6HZi7Rf4icg5eu/pR5pdWg0aZnbKh8GWX0zRAhedfx7Eez7/FahUrBJG3g7 YJmTuojdzRb3hE8znFmmWabYydNPkBxrctDwEe3S5W6MYV2ly8VSPo4rSnRs35CuD7yn jgrtg+A+Sykx+wtgOohgTZzraCeH4dCxhsXas= MIME-Version: 1.0 In-Reply-To: References: <75342033-abbb-4d59-9654-96d5031dcb62@r28g2000prb.googlegroups.com> <4e2ee2dd$0$7291$426a74cc@news.free.fr> Date: Wed, 27 Jul 2011 03:07:32 +1000 Subject: Re: ActivePython: multiple versions on OSX? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311700055 news.xs4all.nl 23967 [2001:888:2000:d::a6]:58144 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10340 On Wed, Jul 27, 2011 at 2:33 AM, Melton Low wrote: > It's probably impractical. =A0You would need a pair for each version of P= ython > installed, ie. (PYTHON26PATH,PYTHON26HOME) for 2.6.x, > (PYTHON27PATH,PYTHON27HOME) for 2.7.x, .... for 3.1.x, for 3.2.x, etc). You could set up a script for each version that looks for environment variables in the right order, stopping when it finds one. Version 3.2.1 would look for PYTHON321PATH, then PYTHON32PATH, then PYTHON3PATH, finally falling back on PYTHONPATH. It could then put the appropriate path into PYTHONPATH (not overwriting the external variable of the same name - if your shell doesn't do that for you, just save it to restore later), and invoke Python. Still seems fairly cumbersome, and doesn't handle the possibility of having two separate installs of the same version number (different builds of 3.3, or 32-bit and 64-bit Pythons, or something). It may be easier to simply create some scripts that set up the environment explicitly, and then invoke Python. Name 'em according to what you want of them. ChrisA