* Moritz Lennert <[email protected]> [2015-06-11 18:37:36 +0200]:
> Hello,
>
> In a python script I have the following call:
>
> grass.run_command('r.series',
> input = rate_maps,
> output = sum_rates,
> method = 'sum',
> overwrite = True,
> quiet=True)
>
> rate_maps is a list which in one instance contains 8559 map names,
> leading to an "OSError: [Errno 7] Argument list too long".
>
> I know that in the shell I could use xargs to work around such a
> problem. But how to do this in python ?
What it the OS limit for it?
>
> I could obviously loop through all maps and thus sum them individually,
> but this just seems horribly inefficient.
>
> Does anyone have a better solution ?
- Maybe split in two or three sessions (instead of looping over all)?
- Have you seen this
<https://gist.github.com/max-nova/487a82de00651a33f2c2#file-grass_demo-py-L28>
Nikos
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev