[GRASS-user] Python Script- grass.debug

Glynn Clements glynn at gclements.plus.com
Mon Sep 27 09:04:53 EDT 2010


Luisa Peña wrote:

> I'm doing a Python script, based on r.in.aster, to import a set of images
> but, I'm not sure for that is used the following:
>     grass.debug("gdalwarp -t_srs %s %s %s" % (proj, srcfile, tempfile))
> WHat is the point of using grass.debug

grass.debug prints a debugging message if DEBUG is set.

It's just an interface to "g.message -d ...":

def debug(msg, debug = 1):
    run_command("g.message", flags = 'd', message = msg, debug = debug)

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list