Chose or make one script for the main process.import all the other scripts (modules) into it.You may want to adjust the python path to make sure your modules are foundThis can be done temporarily (for the session) by usingsys.path.append(customPath)where customPath is the path to your modules.set this before the custom module importsset up the modules with function defs.I like pass all the objects, modules and variables used in the function into it as arguments.for example, in a hypothetical customModule_2:def processTheData(arcpy, sys,
customModule_3,
customModuleToolConfig,
customModuleToolHelper,
variable1, variable2, listA):
Then invoke it like this:return_2 = customModule_2.processTheData(arcpy, sys,
customModule_3,
customModuleToolConfig,
customModuleToolHelper,
"Whoppie!", 2013, listOfStuff)
The return can be whatever you want back:even if it is just a boolean for sucsessful completion.below all the def / functions in the supporting modules,one can add something like # safety
if __name__ == "__main__":
print "This script does not run alone."
so the module script won't try to the start the overall process in the middle.As well, once the whole process is running correctly, a .pyc file will have been generated for each imported module.At that point you can remove those .py files from the accessable directory.It is not perfect security, but it means no one can casually damage the scriptby "just lookin' at it" in a text editor.Leave the main script as a py, and maybe a configuration module, too, for easy modification.