<div dir="ltr">Thanks Anna, it worked!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 12, 2016 at 11:31 AM, Anna Petrášová <span dir="ltr"><<a href="mailto:kratochanna@gmail.com" target="_blank">kratochanna@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Aug 12, 2016 at 1:05 PM, alassane toure <<a href="mailto:atourej@gmail.com">atourej@gmail.com</a>> wrote:<br>
> Group,<br>
> I am running a grass-python script but when i replace a variable argument<br>
> within the command the script does not work....<br>
><br>
> The following works...<br>
> grass.run_command('r.in.gdal',<br>
> input='/home/alassane/Data/<wbr>SanbornCD/tile/newconstr_mask.<wbr>tif',<br>
> output='construction')<br>
><br>
> But not this...<br>
> command="'r.in.gdal', input='"+sys.argv[5]+"', output='construction'"<br>
> print 'r.in.gdal command argument... = %s\n ' % command<br>
> grass.run_command(command)<br>
><br>
> print 'r.in.gdal command argument... = %s\n ' % command<br>
> r.in.gdal command argument... = 'r.in.gdal',<br>
> input='/home/alassane/Data/<wbr>SanbornCD/tile/newconstr_mask.<wbr>tif',<br>
> output='construction'<br>
><br>
><br>
> The following also works...<br>
> command ="/home/alassane/Programs/<wbr>gdal/demclass1"+" "+infile1+" "+infile2+"<br>
> "+sys.argv[3]+" "+outfile<br>
> os.system(command)<br>
><br>
> Your help is appreciated.<br>
<br>
Perhaps this?<br>
<br>
grass.run_command('r.in.gdal', input=sys.argv[5], output='construction')<br>
<br>
Best,<br>
Anna<br>
<br>
><br>
> Regards,<br>
> Alassane<br>
><br>
> ______________________________<wbr>_________________<br>
> grass-user mailing list<br>
> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a><br>
</blockquote></div><br></div>