Helena Herrera wrote:

> In some functions, for instance g.remove even after using quiet=True ther
> warnings are still beng printed. was tha expected?

--quiet suppresses messages; it doesn't suppress warnings.

> Regarding GDALWARP, I'm running this command:
> grass.debug("gdalwarp -t_srs %s -srcnodata %s -dstnodata %s -tr %s %s %s %s"
> % (proj_location, no_value, no_value, t_srx, t_sry, input, tempfile))
> can I use something in order to avoid all the printing that this does?

You can redirect stdout and/or stderr to the null device (/dev/null on
Unix, "nul" on Windows), e.g.:

        nullf = open(os.devnull, 'w')
        grass.run_comand(..., stdout = nullf, stderr = nullf)
        nullf.close()

-- 
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to