I am attempting to execute a script mulitple times from the ArcMap python window (using different parameters that are hardcoded into the file).
The script runs the first time successfully, however it seems to "break" the python console, and other attempts at execfile are unsuccessful afterwards, until I restart arcgis.
Here's the a basic scenario:
- Start ArcGIS, open python console, type:
execfile(r"C:\Users\xxx\Desktop\test.py")
Script executes successfully
Modify test.py script
Type execfile(r"C:\Users\xxx\Desktop\test.py")
Python console returns to prompt
Any ideas on what might be happening? Workarounds?
print "Test worked!"
? What do you "modify" in step 3?print "Test2 worked!"
, would I see the same symptoms?execfile
instead ofimport
and calling functions, or the more ArcGISy way of using a script tool?