random seed

tiissa tiissa at nonfree.fr
Tue Aug 16 15:56:03 EDT 2005


vivek7006 at gmail.com wrote:
> By default, randomm  module uses the timestamp to generate the seed
> value. Is it possible to know what that seed value is?

 From a (very) quick glance at the doc [1], I'm not sure you can get it.

But if you want to reuse it later (for a deterministic behaviour), you 
can get and set the internal state of the generator (using getstate and 
setstate).

[1] http://docs.python.org/lib/module-random.html



More information about the Python-list mailing list