<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">cls.runModule('g.remove', flags='f', type='rast3d', pattern=','.join(['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum']))</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">should work. I think now we see a new challenge with separate type and map name options. In GUI, how should we list map names for the pattern option?</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">1. Select map types first</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">2. List only those maps based on the selected map types.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">It looks like we need some python tricks for g.remove GUI?</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">-- </span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Huidae</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 30, 2014 at 11:30 AM, Vaclav Petras <span dir="ltr"><<a href="mailto:wenzeslaus@gmail.com" target="_blank">wenzeslaus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Sep 26, 2014 at 6:53 AM, Huidae Cho <span dir="ltr"><<a href="mailto:grass4u@gmail.com" target="_blank">grass4u@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Markus,</p>
<p dir="ltr">It has to be a single parameter because of commas in a pattern. Multiple map names are handled as a pattern internally e.g. map1,map2 => {map1,map2}.</p></blockquote><div>Then of course, PyGRASS has no chance to know that and the recent type enforcement addition will force you to use string instead of a list<br><br>cls.runModule('g.remove', flags='f', type='rast3d', pattern=['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum'])<br>...<br>TypeError: The Parameter <pattern> does not accept multiple inputs<br><br><a href="http://fatra.cnr.ncsu.edu/grassgistests/reports_for_date-2014-09-30-07-00/report_for_nc_spm_08_grass7_nc/raster3d/r3.flow/r3flow_test/index.html" target="_blank">http://fatra.cnr.ncsu.edu/grassgistests/reports_for_date-2014-09-30-07-00/report_for_nc_spm_08_grass7_nc/raster3d/r3.flow/r3flow_test/index.html</a> <br><br></div><div>(This test ends with error, PyGRASS is used internally.)<br><br></div><div>I don't know what to do about it besides stating that it how it is or relaxing the type checks in PyGRASS. Adding some info to the option like "behaves as multiple=YES" seem too complicated.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Vaclav<br></div></font></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p dir="ltr">Regards,<br>
Huidae</p><div><div>
<div class="gmail_quote">On Sep 26, 2014 5:48 AM, "Markus Neteler" <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Huidae,<br>
<br>
On Thu, Sep 25, 2014 at 6:20 PM, Huidae Cho <<a href="mailto:grass4u@gmail.com" target="_blank">grass4u@gmail.com</a>> wrote:<br>
> Markus,<br>
><br>
> Currently, g.remove supports "g.remove vect pattern=map1,map2". Pattern can<br>
> take multiple map names separated by a comma.<br>
<br>
ok, good. Perhaps I got just confused because the help text does not<br>
show this yet:<br>
<br>
current:<br>
 g.remove [-refb] type=datatype[,datatype,...] pattern=string<br>
 ...<br>
<br>
expected:<br>
 g.remove [-refb] type=datatype[,datatype,...] pattern=string[,string,...]<br>
...<br>
<br>
It would be multiple = YES for pattern to have that but I don't know<br>
if any other changes might be required then.<br>
<br>
Best<br>
Markus<br>
</blockquote></div>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div>