Geoprocessing With Python →

: Used in custom script tools to return a string result to a user interface or web application.

After running a tool, you can capture its status and messages using arcpy.GetMessages() and write them to a .txt file: Geoprocessing with Python

: The standard Python function to create or open text files for logging or data extraction. Benefits of Geoprocessing with Python Saving Processing Results to a text file - Esri Community : Used in custom script tools to return