I have a script that gets a value from a shapefile's field to return to the user.
It seems that only when the arcpy.SearchCursor is called ArcMap locks the file and it doesn't get removed after the script is finished running. To get the lock off I have to close ArcMap. In the script I delete the SearchCursor object after using it as well as the row object.
The way I have the script working is that it tries to delete the workspace folder on subsequent runs but can't because of the lock...until of course I close ArcMap.
Is there any advice on getting this lock to go away? This seems to be a new occurence for me. Thanks.