<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 6, 2014 at 12:34 AM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
Paulo van Breugel wrote:<br>
<br>
> Just a quick additional question, how to set this GRASS_RND_SEED from<br>
> within a python script (I want to add the option to set the seed with a<br>
> seed parameter in my script, as suggested in the previous email).<br>
<br>
</div>You can modify os.environ prior to calling it, e.g.<br>
<br>
        import time<br>
        import grass.script as grass<br>
        ...<br>
        t = int(time.time() * 1e9) % (2**31)<br>
        os.environ['GRASS_RND_SEED'] = '%d' % t<br>
        grass.mapcalc(...)<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>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.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></span></blockquote></div><br></div></div>