I've created a program that runs externally from GRASS v6.4.1, using python 2.6. It imports an ESRI shapefile, and exports a seperate KML for every polygon in this vector file.
Polygons with islands produce a warning message using "v.out.ogr" saying that features without a category were skipped. Looking into this further, these "skipped" features (islands) are processed later. So the program does what it was designed to do, but I would like it so that this warning message is not printed in the terminal.
VERBOSITY setting were set to "0" using:
os.environ['GRASS_VERBOSE']='0' #runs modules silently
But this doesn't take care of warning messages. I found that there is a gisenv variable called DEBUG, can be set to "0" as well so that all warning messages are silenced too. Problem is, I can't seem to get the proper syntax for my GRASS-python script. I've tried:
Using this line of code atleast allows the program to run, but warning messages are still printed. Other options I've tried terminate the program.
Has anyone successfully set the DEBUG level to "0" in a GRASS-Python script?