On Sun, Jul 6, 2014 at 12:34 AM, Glynn Clements <gl...@gclements.plus.com> wrote:
> > Paulo van Breugel wrote: > > > Just a quick additional question, how to set this GRASS_RND_SEED from > > within a python script (I want to add the option to set the seed with a > > seed parameter in my script, as suggested in the previous email). > > You can modify os.environ prior to calling it, e.g. > > import time > import grass.script as grass > ... > t = int(time.time() * 1e9) % (2**31) > os.environ['GRASS_RND_SEED'] = '%d' % t > grass.mapcalc(...) > > Hi, thanks.. I found out the solution after a bit of diving into the documentation. I btw still think the default should be to have a random seed as I think that is what most people would expect (I did, but after running a function for a day and night, I found out I was wrong). But anyway, it ultimately comes down to preference, so most important I think is if the user has a clear choice available in both the gui and on the command line. If that could be implemented, either way, that would be great. > -- > Glynn Clements <gl...@gclements.plus.com> >
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev