[GRASS-dev] still problems with overwrite in scripts

Hamish hamish_b at yahoo.com
Wed Jun 27 22:56:07 PDT 2012


going back to your original question, if you use --overwrite
with the master script, it should be set for everything called
by the master script as the GRASS_OVERWRITE enviro var will
be set by the parser. You can test to see if it is set with:

import os

    if "GRASS_OVERWRITE" in os.environ:
        print 'ow is ',os.environ["GRASS_OVERWRITE"]
    else:
        print 'os is not set.'

but if the intention is to have modules started within the
master script to respect it too, you shouldn't have to do anything
as it was already taken care of automatically via the exported
enviro var.


Hamish


More information about the grass-dev mailing list