[gdal-dev] help printing the standard out from gdal_grid in python
Nicolas Cadieux
nicolas.cadieux at archeotec.ca
Thu Apr 12 08:13:01 PDT 2018
Hi,
I am not an experienced programmer. I am calling gdal_grid from a
python script. I am using p.imap_ unordered to multiprocess the
script. The idea is the following:
--------------------
def gdal_Grid(fileList):
gdal_Grid_Cmd = 'gdal_grid -l ....'
shell = subprocess.Popen(r'c:\OSGeo4W64\OSGeo4W.bat',
stdin=subprocess.PIPE)
shell.communicate(gdal_Grid_Cmd)
return 'done'
-------------------------
lst = [c:\temp.csv....]
if __name__ == '__main__':
p = Pool(2)
for x in p.imap_unordered(gdal_Grid,lst):
print x
The Question:
I would like to print the output (standard out???) from gdal_grid. I
can't figure how to use stdout=subprocess.PIPE. Can you help me?
Thanks
Nicolas
More information about the gdal-dev
mailing list