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

Geoprocessing from command window : how to generate a log file?

$
0
0
Hi ,

I have executed a simple PY script from the CMD window:

# -*- coding: utf-8 -*-
import arcpy, sys
arcpy.SetLogHistory(True)
arcpy.AddWarning("............... Does this message appear in the logfile?")

The execution is successfull. However no log file was created in C:\Users\<My name>\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\History as it is the case when executing from ArcToolBox.
My question is then: how can I create a log file automatically (I mean: without opening/closing a text file from Python)?

Thanks for your answer.

Piotr

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images