I want to be able to control connections to ArcSDE via python. Here is my script so far using ESRI's example.
import arcpy
from arcpy import env
env.workspace = r"SDEConnection"
fcList = arcpy.ListFeatureClasses()
print str(fcList) + "\n"
env.workspace = ""
arcpy.ClearWorkspaceCache(r"SDEConnection")
print arcpy.GetMessages() + "\n"
But this isnt working .. it crashes my Python window 🙁
Best Answer
According to the updated help, you need to use
arcpy.ClearWorkspaceCache_management()
You can use the following code:
This answer has been derived from OP's comment on the question.