AnsweredAssumed Answered

writing arcpy.GetMessages() to a text file?

Question asked by desertsp on Jul 5, 2018
Latest reply on Jul 5, 2018 by Dan_Patterson

Is there anything wrong with this very simplistic way of writing geo-processing messages to a plain text file? Being new to Python, I was surprised it was this easy....I must be overlooking something!

 

To clarify, I am intending to write the messages from the last tool which was invoked in the script.

 

f = open(resultLogFile, "a")

s = str(arcpy.GetMessages())
f.write(s)

Outcomes