Seeding the rand() Generator

Marcus Wanner marcusw at cox.net
Sun Aug 2 10:36:18 EDT 2009


On 8/2/2009 9:42 AM, Fred Atkinson wrote:
> 	How does one seed the rand() generator when retrieving random
> recordings in MySQL?  
> 
> 	Regards, 
> 
> 
> 
> 						Fred 
something like:

import random, time
random.seed(time.time())
#not actual record access code:
sqlite3.recordaccessfuction(recordid = random.rand())

Marcus



More information about the Python-list mailing list