[GRASS-dev] Possible to use "conditionals" for script options, flags?

Nikos Alexandris nik at nikosalexandris.net
Fri Nov 21 08:43:44 PST 2014


Scripting in Python and defining options and flags in the header, as 
usual using the '#%' markers in the beginning of the line and following 
g.parser's manual. What if there is need to override an option if 
another one is given?

For example, an option considered as required may be the "mean target 
altitude" for i.atcorr's parameter file. What if an elevation map is 
given, which renders the previous option not-required?

What is the common practice for this? Define both options as optional 
and do the necessary checks inside the script?  Or, is there a way to 
override options if another option is given in the definition-header?

Thanks, Nikos


More information about the grass-dev mailing list