I think it depends on how you installed python. Please note that you can have several python installations that I do on my machine. However, if you install python version 2.2 or higher via msi, I believe that it creates such a registry key:
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Application Paths \ Python.exe
which gives this value on my machine:
C: \ Python25 \ python.exe
You just read the registry key to get the location.
However, you can install python using an xcopy-like model, which you can have in any place, and you just need to know where it is installed.
Justin Apr 14 '09 at 23:39 2009-04-14 23:39
source share