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 <SPAN class="operator token">=</SPAN> open<SPAN class="punctuation token">(</SPAN>resultLogFile<SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"a"</SPAN><SPAN class="punctuation token">)</SPAN>
s <SPAN class="operator token">=</SPAN> str<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>GetMessages<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
f<SPAN class="punctuation token">.</SPAN>write<SPAN class="punctuation token">(</SPAN>s<SPAN class="punctuation token">)</SPAN>
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>