[GRASS-dev] grass.mapcalc() python wrapper using grass.start_command()

2012-06-24 Thread Hamish
Hi, in making some of the python modules multithreaded, it would be useful to have a version of grass.mapcalc() which didn't wait until it was done, and returned the Popen object instead. e.g. to process three r,g,b bands in parallel. I just added an experimental grass.mapcalc_start() fn to trun

Re: [GRASS-dev] grass.mapcalc() python wrapper using grass.start_command()

2012-06-24 Thread Hamish
Hamish wrote: > in making some of the python modules multithreaded, it would > be useful to have a version of grass.mapcalc() which didn't > wait until it was done, and returned the Popen object instead. > > e.g. to process three r,g,b bands in parallel. > > I just added an experimental grass.map

Re: [GRASS-dev] grass.mapcalc() python wrapper using grass.start_command()

2012-06-25 Thread Glynn Clements
Hamish wrote: > in making some of the python modules multithreaded, it would be > useful to have a version of grass.mapcalc() which didn't wait > until it was done, and returned the Popen object instead. > > e.g. to process three r,g,b bands in parallel. > > I just added an experimental grass.m

Re: [GRASS-dev] grass.mapcalc() python wrapper using grass.start_command()

2012-06-25 Thread Hamish
> Hamish wrote: > > I just added an experimental grass.mapcalc_start() fn > to trunk/lib/python/raster.py, any comments or better ideas > how to do it? Glynn: > The function looks okay, although using Python threads may > be a better approach in general. why so? for mapcalc_start() or start_comm

Re: [GRASS-dev] grass.mapcalc() python wrapper using grass.start_command()

2012-06-26 Thread Glynn Clements
Hamish wrote: > > The function looks okay, although using Python threads may > > be a better approach in general. > > why so? for mapcalc_start() or start_command()? For running multiple r.mapcalc processes concurrently. Eventually, there may be other long-running functions like mapcalc(), so