<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 14, 2014 at 9:40 AM, Nikos Alexandris <span dir="ltr"><<a href="mailto:nik@nikosalexandris.net" target="_blank">nik@nikosalexandris.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Using the following in a python script's header<br>
<br>
#%option<br>
#% key: outputsuffix<br>
#% key_desc: suffix string<br>
#% type: string<br>
#% description: Suffix for the Pan-Sharpened image(s)<br>
#% required: yes<br>
#% answer: hpf<br>
#%end<br>
<br>
and somewhere in the script the following<br>
<br>
run("g.rename", rast=(tmp_msx_hpf,"%s.%s" % (msx, outputsuffix)))<br>
<br>
works fine in the command line. Testing the modules wx-GUI (G70), doesn't play nice. For exampe,<br>
the following WARNING (error) appears:<br>
<br>
WARNING: Illegal filename <12DEC02053035.blue@python_<u></u>scripting.hpf>. Character <@> not allowed.<br>
WARNING: <12DEC02053035.blue@python_<u></u>scripting.hpf> is an illegal file name<br>
<br>
The "suffix" is added after the Mapset's name(string). Is there no option to "fix" this? Should I "fix" this in my code directly, i.e. take the string, split-off the Mapset-part, put in the suffix and add the Mapset's name in the end?<br></blockquote><div><br></div><div>I would say you have to expect that your input map may have mapset, test it, split if necessary and add suffix to the map name, but you might not need to add the mapset again to the name.</div><div><br></div><div>Anna</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you, Nikos<br>
______________________________<u></u>_________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/grass-dev</a><br>
</blockquote></div><br></div></div>