I am using python to script some processes using ESRI's ArcMap geoprocessor module.
One of the utilities I have compacts my spatial database. When I run my script, sometimes it hangs on the compact call, and then the rest of the script doesn't complete. Other times it completes just fine but can't be trusted to finish.
I don't think there is a way for python to check the status of the process to see if it has hung. So, was wondering if there is a way to tell python to move on to the next line in the script if it doesn't finish within say an hour.
OR, is there a way to call the compact routines from a different python script, and have it return after a set amount of time?
Anyway, pretty new to this python, but am learning. If anyone has any better suggestions, I'm open to them.
Thanks in advance,
R_
here is an example snippet
Expand|Select|Wrap|Line Numbers
- import sys, string, os, arcgisscripting, shutil
- # Create the Geoprocessor object
- gp = arcgisscripting.create()
- WCH_gdb = "\\\\hgis01\\gishome\\ladietz\\WCH.gdb"
- gp.Compact_management(WCH_gdb)