<div class="gmail_quote">On Tue, Jul 26, 2011 at 9:53 AM, Web Dreamer <span dir="ltr"><<a href="mailto:webdreamer@nospam.fr" target="_blank">webdreamer@nospam.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

John Roth a écrit ce mardi 26 juillet 2011 14:00 dans <75342033-<br>
<a href="mailto:abbb-4d59-9654-96d5031dcb62@r28g2000prb.googlegroups.com" target="_blank">abbb-4d59-9654-96d5031dcb62@r28g2000prb.googlegroups.com</a>> :<br>
<div><br>
> On Jul 25, 8:18 pm, Ned Deily <<a href="mailto:n...@acm.org" target="_blank">n...@acm.org</a>> wrote:<br>
>> In article <j0l14e$<a href="mailto:cu...@dough.gmane.org" target="_blank">cu...@dough.gmane.org</a>>, Robert <<a href="mailto:sigz...@gmail.com" target="_blank">sigz...@gmail.com</a>><br>
>> wrote:<br>
>><br>
>> > Is it possible to install the 2 and 3 series side by side?<br>
</div>[...]<br>
<div>> When you do, you might also want to look at PEP 394:<br>
> <a href="http://www.python.org/dev/peps/pep-0394/" target="_blank">http://www.python.org/dev/peps/pep-0394/</a><br>
><br>
> It can simplify writing scripts which select the version you want.<br>
<br>
</div><a href="http://www.python.org/dev/peps/pep-0394/#impact-on-python-environment-variables" target="_blank">http://www.python.org/dev/peps/pep-0394/#impact-on-python-environment-variables</a><br>
What would be a nice feature would be having:<br>
PYTHONPATH (and PYTHONHOME, etc) referring to all versions, and to allow<br>
having PYTHON2PATH, PYTHON2HOME (and PYTHON3PATH, PYTHON3HOME), etc... for<br>
the specific versions.<br>
This would allow having global variables for all versions, and special<br>
variables for specific versions, to allow more flexibility.<br>
Or would it be silly?<br>
<br>
--<br>
<font color="#888888">Web Dreamer<br>
</font><div><div></div><div><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br><div>It's probably impractical.  You would need a pair for each version of Python installed, ie. (PYTHON26PATH,PYTHON26HOME) for 2.6.x, (PYTHON27PATH,PYTHON27HOME) for 2.7.x, .... for 3.1.x, for 3.2.x, etc).  Not just one set for the 2.x series and another for the 3.x series.  Some developer may have 2.5.x, 2.6.x, 2.7.x, 3.1.x and 3.2.x installed.  These environment variables have to be set somewhere, probably in your personal shell startup script or the system-wide shell startup script, which have to be maintained.  Even with all those environment variables set, you would still have to invoke the version of Python you want in order for it to pickup the variable.</div>

<div><br></div><div>On Mac OS X, a link is automatically installed in /usr/local/bin for each version of the Python executables, ie python2.7 for the 2.7.x  and python3.2 for 3.2.x.  Just invoke your script with the appropriate Python version.  eg. python3.2 yourscript to run 'yourscript'.</div>

<div><br></div><div>Other people will have different ideas.</div><div><br></div><div>Cheer, Mel</div>