Multiple versions of Python coexisting in the same OS

Gelonida gelonida at gmail.com
Mon Jul 26 03:24:08 EDT 2010


>>
>> Thus my idea of having a pystarter with a config file
>> mentioning which directories (tools) should use which python executable
> 
> Well, good luck ! I don;t know how this is resolved for you when some
> scripts executes 'python xxx yyy' or 'someScript.py yyy'.

both could be resolved with a python starter if one wanted.

call the python starter python.exe and put it first in the path.
set the python file associations to the python starter.


By the way:

Something similiar (not identical) has been used for linux hosts in big
companies in order to easily switch between different projects.  (which
potentilly had different versions of development tools)

instead of having multiple .cshrc / .bashrc files

the first entry of path has been set to
/_WRAPPER_/bin (or something similiar)
in this directory one found a wrapper script for each tool to be
wrapped. ( one script, many symlinks for each tool)

the wrapper script took a global setup, the project name and a private
setup to finally call the the desired script.

What is missing is to choose the executable depending on the script to
be called.

If one has a wrapper this could be added.

Just a question of style, whether the decision which script to be called
should come from the
- user
- a config file ( No script to be intrusively changed, what Edward seems
to prefer )
- some coding in the script or the tool's directory ( which MRAB seems
to prefer )









More information about the Python-list mailing list