I need to see is a log showing the success or failure of the Python portion of the code.Is there a way of getting Python to dump a log file out to specific location while it is running in SAS?
try: ... do your work ... except Exception, msg: errMsg = "script failed\n" + str(msg) # write a message to gp out arcpy.AddError(errMsg) # print a message to stdout print "** " + errMsg # write to a log file f.open("c:\\temp\\out.txt","w") f.write(errMsg + "\n") f.close()
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.