Works perfectly.
Michael
On Jun 28, 2012, at 12:43 PM, Glynn Clements wrote:
>
> Michael Barton wrote:
>
>> My question was about testing for the overwrite flag. But I did try
>> this, as I mentioned in my post to Glynn and get an error wherever I
>> put it. I tried in the string option for ou
Thanks!!!
This is what I needed to know.
Michael
On Jun 28, 2012, at 12:43 PM, Glynn Clements wrote:
>
> Michael Barton wrote:
>
>> My question was about testing for the overwrite flag. But I did try
>> this, as I mentioned in my post to Glynn and get an error wherever I
>> put it. I tried in
Michael Barton wrote:
> My question was about testing for the overwrite flag. But I did try
> this, as I mentioned in my post to Glynn and get an error wherever I
> put it. I tried in the string option for output prefix first, of
> course. But when that didn't work, I tried in the input and
> pul
Thanks, but neither are relevant (or work) in my case. See below.
> 2012/6/26 Michael Barton :
>> What is the test for the parser based overwrite flag?
>
> as I told you the flag is added by parser automatically when there is
> at least one option which is dedicated for output, eg. G_OPT_V_OUTPU
Hi,
2012/6/28 Michael Barton :
> #%option G_OPT_R_INPUT
> #% key: ms3
> #% description: Input raster map for red channel
> #%end
>
> So there is no way to add "new" unless I redo the options section.
but this is standard option for input not output! "new" refers to
`gisprompt`. Eg.
#% gisprom
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:
Hmmm. This should have worked. But...
The options (copied from another script) are written as...
#%option G_OPT_R_INPUT
#% key: ms3
#% description: Input raster map for red channel
#%end
So there is no way to add "new" unless I redo the options section. This way of
doing the interface is new,
Thanks. I'll try one of these methods.
Michael
On Jun 27, 2012, at 5:06 PM, Glynn Clements wrote:
>
> Michael Barton wrote:
>
>> I thought from reading past mail posts that -o and --o and --overwrite
>> all set the overwrite flag.
>
> The last two do; the first one is just a normal flag.
>
>
Michael Barton wrote:
> I thought from reading past mail posts that -o and --o and --overwrite
> all set the overwrite flag.
The last two do; the first one is just a normal flag.
Historically, modules used -o for overwrite, but that is deprecated in
favour of the --o/--overwrite option which is
I thought from reading past mail posts that -o and --o and --overwrite all set
the overwrite flag.
I test for overwrite with grass.overwrite()
But how do I include a check box for the overwrite flag in the GUI specs (for
g.parser)?
Putting in an "o" flag does not seem to set the overwrite flag
10 matches
Mail list logo