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()
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.