From: Gelonida on
On 07/26/2010 06:36 AM, Edward Diener wrote:
>
> I start a Python script for version X by going to X's root directory and
> invoking 'python someScript.py' from the command line. Does that not
> sound reasonable ?

Do you have an example of two (not self written) applications requiring
to change the python file association in order to be working?

I never had problems with this, so would be curious about the tools to
avoid.



Apart from that my suggestion for you would be:


Don't write a tool.
Just create one .bat file for each sript to be started.

The bat file should set the python search path.
This should cover 90% of existing python scripts.
(If you want, you could write a tool to create the bat files)


Now the second problem.

if a python script starts another python file without calling python.exe
but via the file associations, then above solution would not be sufficient/
you had to additionally change the file associations,
(which can easily be done from a bat file as well if you insist. The
commands you need are 'assoc' and 'ftype')

But does this really happen to you?



Please note:
Trying to develop a solution, which believes that you will never have
two concurrent applications requiring two differnt python versions
sounds a little dangerous.