2

Possible Duplicate:
How can I programmatically get the path of “Python.exe” used by ArcMap

I am trying to get some information from registry about ArcGIS. I am using ArcGIS Desktop 10.0 and For this the registry looks like:

registry key for arcgis

My questions are:

  1. What does it mean when the "Python10.0" subkey has a "True" value?
  2. When "Python10.0" subkey has a "False" value?
  3. Does the registry key values same for every version of ArcGIS?

[Close]

I have edited How can I programmatically get the path of “Python.exe” used by ArcMap question. Thanks @blah238 and @whuber♦ to get me the wrong. Now, this is a close question. Please help me for previous one.


Closely related

At How can I programmatically get the path of "Python.exe" used by ArcMap I asked how to obtain the path to Python.exe programmatically within ArcMap. Of the several solutions offered, one of them suggested using the registry, prompting the present question.

Emi
  • 2,405
  • 2
  • 22
  • 40
  • 1
    This again? http://gis.stackexchange.com/questions/44411/how-can-i-programmatically-get-the-path-of-python-exe-used-by-arcmap – blah238 Jan 21 '13 at 11:14
  • 1
    @blah238 I don't think these two are same because here I need some information about key's. If there is any constant way, that ArcGIS follows, then, it is easy to take decision. – Emi Jan 21 '13 at 11:19
  • 1
    I forgot to ask, but what exactly are you looking for? The path to python.exe again? Help us to understand what you are trying to accomplish and why. This will make your question more applicable and useful to other readers. – blah238 Jan 21 '13 at 11:58
  • My final destination is to get python path. Though now I already doing this by keeping python path in Path environment, but now I want to know about this registry key, if it can help me to get python path from registry – Emi Jan 21 '13 at 14:16
  • Then I don't see anything substantially different from the other question. Are you still looking to do this with C#? – blah238 Jan 21 '13 at 14:21
  • This is different because here I purely want to know about how much I rely on registry. This is because when I installed python2.7 in my machine and add it to the path environment and remove python 2.6's path from path environment, still then arcmap used python 2.6. so, it is conflicting. If I can rely on registry I can get path from here – Emi Jan 21 '13 at 14:28
  • You cannot use Python 2.7 with ArcGIS 10.0. If that's what you are trying to do, then I cannot help you. You will need to explain in detail what exactly you have done and why, as that is a non-standard configuration. – blah238 Jan 21 '13 at 14:33
  • Also the ESRI registry is managed by the ESRI installer; if you have modified your configuration from the standard by uninstalling the included version of Python and installing another version, the ESRI registry will not be updated to reflect this and it will be of no use. – blah238 Jan 21 '13 at 14:35
  • when my machine has multiple python installed, I want to get python that is used by arcgis, without creating any other tool. – Emi Jan 21 '13 at 15:00
  • I still think this is a duplicate of the linked question. There is not enough of a substantial difference between the two. If you go back to your original question and edit it to include more background information on your environment, what you are trying to accomplish, etc., perhaps you will get some more focused answers. – blah238 Jan 21 '13 at 15:18
  • Ok, then, I will try to edit my previous question. But still now I don't think these are same :( – Emi Jan 21 '13 at 15:22
  • Do not be discouraged, have a look at this guide on writing a good question: http://msmvps.com/blogs/jon_skeet/archive/2010/08/29/writing-the-perfect-question.aspx – blah238 Jan 21 '13 at 15:24

1 Answers1

1

Just guessing here, but short answers:

  1. Python was installed with ArcGIS
  2. Python was not installed with ArcGIS
  3. No. Each major release of ArcGIS has shipped with a different version of Python (9.3 -> 2.5, 10.0 -> 2.6, 10.1 -> 2.7) Additionally the ESRI registry structure has continually evolved, making this type of logic painfully complex. I do not have any working examples, but maybe someone else does.
blah238
  • 35,793
  • 7
  • 94
  • 195
  • I also guessed first two things in this way. But want to sure about it. and for third question, my concern is not about python's version, my concern is about is there any stable way, that is followed by esri to write on registry – Emi Jan 21 '13 at 11:25
  • Wait, you want to write to the ESRI registry? Why? – blah238 Jan 21 '13 at 11:26
  • Sorry for the misunderstanding. I am not going to write anything in ESRI registry. I want to know does it always write it's python key in this way or not? – Emi Jan 21 '13 at 11:29
  • How far back in history do you want to go with this? ArcGIS Desktop has been around for over a decade. Do you want to support <=9.3 or just 10.0 and up? – blah238 Jan 21 '13 at 11:31
  • I want to support 10.0 and up – Emi Jan 21 '13 at 11:42
  • Good because I was going to say read this (Deployment Considerations section): http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Migrating_ArcGIS_9_3_Desktop_and_Engine_custom_components_to_ArcGIS_10/0001000002m2000000/PlatformCPU/ – blah238 Jan 21 '13 at 11:49