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()
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.