random seed

Robert Kern rkern at ucsd.edu
Tue Aug 16 18:14:13 EDT 2005


vivek7006 at gmail.com wrote:
> Thanks. I guess I will use  the system time and pass it as seed
> explicitly. My goal is to replicate the random numbers that I generate
> to ensure repeatabilty in the regression test suite that  I am trying
> to write.

In that case you should just pick a single seed yourself instead of 
getting it from system time.

   random.seed(1234567890)

is traditional and works just fine.

Other favorites:

   3141592653589793
   2718281828459045

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter




More information about the Python-list mailing list