Seeding the rand() Generator

Fred Atkinson fatkinson at mishmash.com
Tue Aug 4 03:48:42 EDT 2009


On Mon, 3 Aug 2009 20:00:08 -0700 (PDT), Carl Banks
<pavlovevidence at gmail.com> wrote:

>Your question is a MySQL question, not a Python question.  I don't
>know off hand how to seed the RNG in MySQL, and, since this is a
>Python group and not a MySQL group, I don't care to look it up.  But
>if you were able to produce the MySQL statement in PHP that does it
>you shouldn't need to ask.
>
>If you don't "get" why this is a MySQL question and not a Python
>question, then you need to learn more about what you are doing.

	I wouldn't agree.  

	I tried using the same command I used when I did this in PHP.
That command was: mt_srand(date("w"))

	It was a PHP command that seeds the MySQL random function,
according to the folks on the PHP newsgroup.  

	I'm trying to figure out what the Python equivalent of that
is.  

	Now do you see?  



						Fred 



More information about the Python-list mailing list