Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Python called from batch file --> geoprocessing logs

$
0
0
Hi all,

I am calling a number of Python scripts from a batch file like below (simplified)
SET PATH=%PATH%;D:\apps\Python27\ArcGIS10.1
SET PYSCRIPT="D:\Projects\MyTestScript.py"
python %PYSCRIPT%
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)
arcpy.gp.logHistory = 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,
Joep

Viewing all articles
Browse latest Browse all 2485

Trending Articles