<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 8:08 AM, Enrico Gallo <span dir="ltr"><<a href="mailto:enrico.gallo@gmail.com" target="_blank">enrico.gallo@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think "<stdin" is not an option </blockquote>

</div><br>Actually, it is for Python (m.proj example):</div><div class="gmail_extra"><br></div><div class="gmail_extra">from grass.script import core as gcore<br></div><div class="gmail_extra">...</div><div class="gmail_extra">

<div class="gmail_extra">    proc = gcore.start_command('m.proj', input='-', separator=' , ',</div><div class="gmail_extra">                               flags='od',</div><div class="gmail_extra">

                               stdin=gcore.PIPE, stdout=gcore.PIPE,</div><div class="gmail_extra">                               stderr=gcore.PIPE)</div><div class="gmail_extra"><div class="gmail_extra">    proc.stdin.write(proj_in)  # put string to the module stdin</div>

<div class="gmail_extra">    proc.stdin.close()</div><div class="gmail_extra">    proc.stdin = None  # not sure if this really necessary</div><div class="gmail_extra">    proj_out, errors = proc.communicate()</div><div class="gmail_extra">

    if proc.returncode:</div><div class="gmail_extra">        raise RuntimeError("m.proj error: %s" % errors)</div><div class="gmail_extra">    # process stdout written into the proj_out string</div><div class="gmail_extra">

    ...</div><div class="gmail_extra"><br></div><div class="gmail_extra">But coordinate_file might be better in your case (I'm not sure how to rewrite code above to easily handle large amounts of coordinates).</div><div class="gmail_extra">

<br></div><div class="gmail_extra">Vaclav</div></div></div></div>