On Fri, Feb 14, 2014 at 8:08 AM, Enrico Gallo <[email protected]>wrote:
> I think "<stdin" is not an option
Actually, it is for Python (m.proj example):
from grass.script import core as gcore
...
proc = gcore.start_command('m.proj', input='-', separator=' , ',
flags='od',
stdin=gcore.PIPE, stdout=gcore.PIPE,
stderr=gcore.PIPE)
proc.stdin.write(proj_in) # put string to the module stdin
proc.stdin.close()
proc.stdin = None # not sure if this really necessary
proj_out, errors = proc.communicate()
if proc.returncode:
raise RuntimeError("m.proj error: %s" % errors)
# process stdout written into the proj_out string
...
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).
Vaclav
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev