Configuration File for a Python Script

Discussion created by JacobCoble on Jul 9, 2011
Latest reply on Jul 12, 2011 by christophfricke
I have some Python geoprocessing scripts I would like to share with several people. A problem is, for example, each person would use a different path as to where they read/write data. I could give the same scripts to each person, only customize the scripts with whatever paths the people are using. But that is cumbersome. I was wondering if I could make a configuration file for these Python scripts and the customizations would only be in this one config file. Back in the .AML days, I could make an .aml called, say, SetVars.aml that would contain all the variables and I could make a geoprocessing .aml read SetVars.aml. That way I could install my geoprocessing .amls on different computers and I would only have to customize the SetVars.aml rather than having to customize every script. Or if I had to change some paths, these paths would be defined as variables in one nice, neat file rather than scattered among several scripts. I want to do something similar to this in the ArcGIS Python world. I don't want these variables to be parameters the user would have to choose - I would just like to have certain variables in a convenient script that the other Python scripts could read, if that is possible. If anyone could point me to an example of this I would appreciate it.