As we know, there are few versions of ArcGIS (9.x,10) and Python(2.x,3.x) are in use. Issues are facing when we run scripts/toolbox of arcgis since the script written in one version of python and the python installed with arcgis is different version.
- How to identify python script version so that we can directly execute and save time?
- How to convert the existing python script to the installed python version on the system and get result without hassle of programming?
- Is there any procedure for ArcGIS to take python version 2/3.x as default so that, we can install multiple versions of python and change default version to run according to our requirement?
Answer
1) There's no such thing as a script version, but there is a standard for defining package requirements for a Python interpreter version. See PEP 345: http://www.python.org/dev/peps/pep-0345/.
2) Search for "2to3". It does not remove the "hassle" of programming.
3) In Python programming, we use virtualenv to juggle interpreters and specific sets of packages. I don't know if ArcGIS supports such virtual environments.
No comments:
Post a Comment