<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 11-06-15 19:22, Anna Petrášová
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAE0EDEqEZxaJh9rzUnrwukePho1EDXsNg0dkzxvD4HcPfiCu=A@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Thu, Jun 11, 2015 at 12:37 PM,
            Moritz Lennert <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:mlennert@club.worldonline.be"
                target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a></a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
              <br>
              In a python script I have the following call:<br>
              <br>
              grass.run_command('r.series',<br>
                                 input = rate_maps,<br>
                                 output = sum_rates,<br>
                                 method = 'sum',<br>
                                 overwrite = True,<br>
                                 quiet=True)<br>
              <br>
              rate_maps is a list which in one instance contains 8559
              map names, leading to an "OSError: [Errno 7] Argument list
              too long".<br>
              <br>
              I know that in the shell I could use xargs to work around
              such a problem. But how to do this in python ?<br>
              <br>
              I could obviously loop through all maps and thus sum them
              individually, but this just seems horribly inefficient.<br>
              <br>
              Does anyone have a better solution ?<br>
              <br>
              Moritz<br>
              <br>
            </blockquote>
            <div><br>
            </div>
            <div>It seems we are hitting these issues quite often, we
              should consider add input file as an option like many
              temporal modules already have. But splitting as Nikos
              suggests has the advantage that you can parallelize the
              computation.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    +1 add input file as an option<br>
    <br>
    <blockquote
cite="mid:CAE0EDEqEZxaJh9rzUnrwukePho1EDXsNg0dkzxvD4HcPfiCu=A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <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>
              grass-dev mailing list<br>
              <a moz-do-not-send="true"
                href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.osgeo.org/mailman/listinfo/grass-dev"
                target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
grass-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-dev">http://lists.osgeo.org/mailman/listinfo/grass-dev</a></pre>
    </blockquote>
    <br>
  </body>
</html>