When I run any geoprocessing tool using arcpy feedback should be better than this:
$ python create_anno.py
That is to say -- no feedback of any kind at all for hours -- did it crash? Is it stuck in a loop? Is it working? Is it 90% done and I should keep waiting?? The same thing is true for running in a model or directly from the dialog or in a python script -- I need to know what is going on. A spinning blue circle and a pulsating bar do not count.
Hooks would be great too, for example
arcpy.ContourAnnotation_cartography(contour_1, contour_gdb__2_, "Contour", "240",
annotation_1ft_240, "BLACK", "type", "UPHILL", "ENABLE_LADDERING",
callback=status_callback)
def status_callback(msg):
print("ContourAnnotations says ",msg)
As you can guess from this code, my problem today was in contour annotation, but it is the same in many other tools. Any operation that takes longer than a few seconds should give lots of feedback.