On Mon, Aug 27, 2012 at 11:12 AM, Barry Rowlingson
<[email protected]> wrote:
> On Mon, Aug 27, 2012 at 1:22 PM, Werner Macho <[email protected]> wrote:
>> On Mon, Aug 27, 2012 at 1:37 PM, Agustin Lobo <[email protected]> wrote:
>>> Hi!
>>>
>>> I've tried the R script in scripts/Raster histogram
>>> and do not get any plot, just get what can be seen here
>>> (after trying multiple alternatives):
>>> http://dl.dropbox.com/u/3180464/RSextante.jpeg
>
>  I think the subprocess.Popen call in RUtils is at fault. The
> "command" is a list, but I think shell=True causes it to be sent to
> the shell as a command line. If you concatenate (join) the command
> list with spaces into a single string, this works:
>

You are right, because shell=True is used when command is a string,
not an array.

Plus it's deemed a security hazard:
Warning Invoking the system shell with shell=True can be a security
hazard if combined with untrusted input. See the warning under
Frequently Used Arguments for details.

>  proc = subprocess.Popen(" ".join(command), shell=True,
> stdout=subprocess.PIPE,
> stdin=subprocess.PIPE,stderr=subprocess.STDOUT,
>                                 universal_newlines=True)
>
>
> line 62 of RUtils.py in the sextante plugin.
>
> Barry
> _______________________________________________
> Qgis-developer mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to