Python called from batch file --> geoprocessing logs

Discussion created by luijten on Jan 24, 2013
Latest reply on Jan 24, 2013 by jamesfreddyc
Hi all,

I am calling a number of Python scripts from a batch file like below (simplified)

[INDENT]SET PATH=%PATH%;D:\apps\Python27\ArcGIS10.1
SET PYSCRIPT="D:\Projects\"

and would like to benefit from the geoprocessing logging capabilities so that all messages written by arcpy.AddMessage() in the python scripts can be viewed later on from the ArcCatalog Geoprocessing > Results window.

I have added the following statements in the beginning of my Python scripts
    arcpy.SetLogHistory(True) = True

but that doesn't seem to have any effect.
Is the only way to save the geocompressing logging if you execute the scripts actually from a tool within the ArcCatalog environment?

Thanks for any suggestions,