[GRASS-dev] pyGRASS: ParallelModuleQueue

Martin Landa landa.martin at gmail.com
Wed Nov 30 04:29:16 PST 2016


Hi,

2016-11-30 13:00 GMT+01:00 Pietro <peter.zamb at gmail.com>:
> Yes, I think so, if you pass the stderr_=subprocess.PIPE and
> stdout_=subprocess.PIPE parameters to the module, then you should be
> able to write the current percentage using grass.percent() or
> msgr.percent().

yes, but then you get progress info for each module separately, right?
Then you need to process stderr/stdout on your own...

Wouldn't make sense to add something like _progress=True. Then module
could call msgr.percent() automatically when it finish.

queue.percent(5, count) # print each 5%
module = Module(..., _run=False, _progress=5)
for ... in ...:
...
queue.wait()

? Ma

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa


More information about the grass-dev mailing list