NewGuard

does running a script as a tool alter python import behavior?

Discussion created by NewGuard on Apr 9, 2014
I have attempted to create a common "shared_variables.py" module so that I can share information between a python script tool and an outside python interface.  It seems that when the script tool is executed and the "import shared_variables" line is executed, rather than creating access to the data within 'shared_variables.py' it actually creates a copy of 'shared_variables.py' and grants access to the copy.  This is not how python is supposed to work, but is this how python works within arcgis, specifically the script tools?

Outcomes